An irritating X Windows limitation with wheel mice

November 26, 2006

I use what I call 'lazy focus follows mouse' in my window manager (fvwm2 calls it SloppyFocus): the last window that the mouse touched has focus, but the mouse doesn't have to actually stay inside the window. I like this because it means that I don't have to have the mouse cursor obscuring some of the window contents.

(I am not a fan of click to focus, but that's another entry.)

Unfortunately, this exposes an X limitation in how it handles wheel mice. The problem is in two parts; first, turning the wheel produces mouse button events, and second, X sends mouse button events to the focused window only if the mouse cursor is actually over it. Thus I can't touch a window, move my cursor away, and still use the mouse wheel.

(I believe you would see the same issue with click to focus, although I'm not sure.)

How it should work is that mouse wheel events should be like keyboard events, and thus get delivered to the focused window regardless of where the mouse is. I tend to believe that this is actually how people see the mouse wheel; it's less like clicking a mouse button and more like hitting a key on the keyboard.

This issue is one significant reason that I don't like wheel mice. (Another is that the wheel generally steals the middle mouse button position, so that actually clicking the middle mouse button requires more force and is more error-prone; I use my middle mouse button a lot more than I would use a wheel. I would probably like a three button wheel mouse that put the wheel under my thumb and left the middle mouse button alone, but I have no idea if they make such a thing.)

Written on 26 November 2006.
« Link: Serif vs. Sans Serif Legibility
Why I don't rip my CDs »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Nov 26 23:39:32 2006
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.