[xmonad] real focus-follows-mouse or selective UpdatePointer

Kathryn Andersen kat_lists at katspace.org
Mon Feb 2 20:46:55 EST 2009


I'm used to having focus-follows-mouse, so I've enabled that with xmonad;
however there are situations where the focus does NOT follow the mouse,
such as when I switch workspaces; the focus can be in one window, and
the mouse can be over another window.  The usual way, in those
situations, to get the focus where the mouse is, is to move the mouse
out of the window and then back in again.

I've tried the UpdatePointer module, but that isn't really
focus-follows-mouse, that's mouse-follows-focus.  This messes things up
in, for example, Gimp, where I have Gimp tiled (with IM layout) and then
a dialogue window pops up, and the mouse moves position to that window,
while still focused in its own window, which can really wreck things
when one is trying to do delicate graphics manipulations!

So is there a way of having true focus-follows-mouse, or of having some
kind of exceptions for UpdatePointer for windows of a given class?

There are two problematical use-cases for me.  The first is the Gimp one
above, where I do not want the UpdatePointer behaviour to apply.

The second use-case is when I have selected something in one workspace
(for example, the workspace where my web-browser is) and switch to
another workspace, where I type a command and then middle-mouse-click to
paste what I selected from the previous workspace.  But what can happen
is that when I switch workspaces, the focus is in terminalA, but the
mouse is over terminalB, so what I type goes in terminalA, and what I
paste goes in terminalB, which is not what I wanted.  In this case, I do
want the UpdatePointer behaviour to apply.

Any ideas for solutions?

Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe


More information about the xmonad mailing list