Edge flipping.
So, in my previous blog post, I mentioned that Enlightenment, bug-ridden as it is, is the only application I've seen thus far that implements edge flipping the right way. Since it's been a long time since I last used the only windowmanager that actually implements it the right way, I've been able to give it quite some thought by now. Here's my take at it:
The central thing to remember is that the edge flipping interface will trigger accidentally. No matter how well you implement your interface, sometimes a user will accidentally move his or her mouse, or he/she will want to click somethin near the edge of the screen and touch it. Therefore, there are two things an implementer should do:
- Make every effort to avoid accidental edge flipping where possible, and
- Make it as easy as possible for the user to correct an accidental triggering of the interface.
The best way is to make sure your interface has the following characteristics:
- The code should not trigger if the mousebutton is pressed down. The reason for this is that many people like to maximise their windows, and that many interfaces keep their scrollbars near the edge of the window. Scrolling is often accomplished by moving the mouse over the scrollbar; and since human beings are not machines, it's usually impossible for them to move their mouse in a straight line. It's fair to say that when you're holding your mouse down, you're usually not interested in edge flipping. GNOME's brightside gets this wrong, which makes it a horrible nightmare.
- The code should not trigger immediately. When you move your mouse, it's fairly common to touch the edge of the screen. Thus, edge flipping should only happen after a delay. However, when it is happening, it should continue to do edge flipping until the mouse has not touched the edge anymore before another delay has passed (otherwise moving two or three workspaces at once takes too much time). While I haven't seen any implementation get this horribly wrong, I've seen implementations get this wrong in their default configuration (again, brightside).
Getting the above two right will ensure that accidental edge flipping is reduced to a minimum. This is the first step, and one that only Enlightenment and IceWM got right. The final step, however, is something that IceWM does not get right; and this is what makes Enlightenment's edge flipping implementation such a natural thing to do:
- After edge flipping, warp the mouse to the opposite side of the screen, just far enough away from the edge so that it will not immediately flip back again.
Some people will find that last point evil, I'm sure. I'll admit it took me a while to get accustomed to it as well. But it's the only natural thing to do. You should think of your virtual workspaces as one large desktop; if you're using four workspaces next to eachother, that means one large desktop four workspaces wide. When you move the mouse one quarter to the left, it's normal that it ends up about the same place on that same desktop. In other words, warp the mouse.
Additionally, the mouse warping will have the effect that it makes recovery from accidental edge flipping easy and fast. If the mouse stays where it was after edge flipping (as in the case of brightside and IceWM), then if I accidentally hit my mouse, by the time I've moved my arm towards the mouse and started moving it back, I've moved away three workspaces from where I was already (because of the second bullet point in this post). If, however, the mouse does warp to the opposite side of the screen (i.e., the side where it was coming from), then going back to where you were is just a matter of moving the mouse a few millimeters in the opposite direction. Very easy to accomplish, that...
Oh, and finally, you also shouldn't segfault at random. Again something that brightside did not get right when I used it—did I mention that brightside is crap? Well, I did now. Hopefully it's changed for the better in the mean time.
Back in my Enlightenment days, I used workspaces a lot, because Enlightenment made it so natural with its excellent edge flipping implementation, and with the help of the pagers which would always, at any time, give me a snapshot of all my workspaces, helping me to remember where this or that application was running. IceWM doesn't replace that, but it sure gets close.
I'm a loyal user of FVWM (apt-get install fvwm-gnome), which you may want to check out; although I've historically preferred to switch virtual desktop panes by hitting special key combinations, it also supports mouse-driven edge flipping, complete with automatic warping. Moreover, I've found it to be extremely stable; I honestly can't remember the last time it's crashed on me.
(As an added bonus, it's highly configurable, albeit in a somewhat idiosyncratic language all its own).
compiz also gives a nice warning, by starting to rotate as you push against the edge of the screen.
also if you were discoving the edge flipping by acedent, it is visually obvoius that you have just rotated to a new desktop, rather than all your applications have sudenly closed
Well, I'm not an edge-flipping user, but it looks to me like KWin (KDE's windowmanager) does all the above points, including the last one. Maybe KWin can be used independantly of KDE, if you don't like the whole machinery.
I am not looking for an alternative to IceWM. All these suggestions about alternate window managers are nice, but there are more points to a good user interface than just edge flipping. And while IceWM's edge flipping implementation isn't perfect, it's certainly bearable. So, suggestions about other window managers, while nice, will be completely ignored. At least by me
Intesting thoughts.. just a few comments re: brightside.. I've had my own ordeals with it (I am an ex-E user myself).. however:
I don't think this is as cut and dry as you suggest. This is likely to be dependent on a particular user's whim (especially as workspaces in general, and "gestures" to interact with them in particular, are something of a power user feature). I use edge flipping extensively, and I would find it unusable if it behaved as you suggest. I drag things across workspace boundaries constantly. Windows, files, etc... there may be other ways to handle these actions, and I certainly flip accidentally with scrollbars sometimes. I think the holy grail here is context; scrollbar drags/window resizes should disable the behavior, while DnD/window moves probably should not.
This is configurable in brightside, and IIRC the defaults in the latest version are reasonable.
This works as expected in brightside.
As does this.
(I assume its been a while since you used it.. just wanted to let you know..)