[xmonad] Re: Respecting the Window Manager Input Hint

Bas van Dijk v.dijk.bas at gmail.com
Wed Feb 3 11:05:50 EST 2010


The attached patch does what I want. It only sets the input focus when
the window needs it:

hunk ./XMonad/Operations.hs 330

     -- If we ungrab buttons on the root window, we lose our mouse bindings.
     whenX (not <$> isRoot w) $ setButtonGrab False w
-    io $ do setInputFocus dpy w revertToPointerRoot 0
+    io $ do needsInput <- liftM wmh_input $ getWMHints dpy w
+            when needsInput $ setInputFocus dpy w revertToPointerRoot 0
             -- raiseWindow dpy w

Can anybody review this?

Also see: http://tronche.com/gui/x/xlib/ICC/client-to-window-manager/wm-hints.html

regards,

Bas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: only_setInputFocus_when_needed.patch
Type: application/octet-stream
Size: 3620 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20100203/ed40838c/only_setInputFocus_when_needed.obj


More information about the xmonad mailing list