diff options
author | Jason Creighton <jcreigh@gmail.com> | 2007-06-13 04:53:50 +0200 |
---|---|---|
committer | Jason Creighton <jcreigh@gmail.com> | 2007-06-13 04:53:50 +0200 |
commit | 4772aa6c8988644dfcd4704854e0532141a6f4f9 (patch) | |
tree | e57e86265bddcd87d54a75cd2c1f5c1700b0f41d | |
parent | 671f40ba18efd1182c6ad93892064120f89ab1a6 (diff) | |
download | metatile-4772aa6c8988644dfcd4704854e0532141a6f4f9.tar metatile-4772aa6c8988644dfcd4704854e0532141a6f4f9.zip |
prevent keyboard focus from getting lost in some cases
darcs-hash:20070613025350-b9aa7-8fc8986ffc4a7c694fa28b49d60d82a81f46e616
-rw-r--r-- | Operations.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Operations.hs b/Operations.hs index 0a112b4..600e1e6 100644 --- a/Operations.hs +++ b/Operations.hs @@ -322,11 +322,11 @@ setFocusX w = withWindowSet $ \ws -> do setButtonGrab True otherw io $ setWindowBorder dpy otherw (color_pixel nbc) - whenX (not `liftM` isRoot w) $ do - io $ do setInputFocus dpy w revertToPointerRoot 0 - -- raiseWindow dpy w - setButtonGrab False w - io $ setWindowBorder dpy w (color_pixel fbc) + -- If we ungrab buttons on the root window, we lose our mouse bindings. + whenX (not `liftM` isRoot w) $ setButtonGrab False w + io $ do setInputFocus dpy w revertToPointerRoot 0 + -- raiseWindow dpy w + io $ setWindowBorder dpy w (color_pixel fbc) -- --------------------------------------------------------------------- -- Managing layout |