summaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-06-04 22:16:39 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-06-04 22:16:39 +0200
commitaa6e14bde4f482918f6f40108b67b4e83153cb36 (patch)
treee08646c9263199d864ab431d23bc0c3977d4c91e /Operations.hs
parent557101c3920f540f0de854cc15f01d36c7be0625 (diff)
downloadmetatile-aa6e14bde4f482918f6f40108b67b4e83153cb36.tar
metatile-aa6e14bde4f482918f6f40108b67b4e83153cb36.zip
Use 'windows' in 'focus'
darcs-hash:20070604201639-a5988-07a811aea77e4e22ae853cd09ddb3a6cd3e1cd61
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs
index 3736081..6e87d05 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -258,7 +258,7 @@ setTopFocus = withWindowSet $ maybe (setFocusX =<< asks theRoot) setFocusX . W.p
-- the mouse to a new screen).
focus :: Window -> X ()
focus w = withWindowSet $ \s -> do
- if W.member w s then modify (\st -> st { windowset = W.focusWindow w s }) >> refresh
+ if W.member w s then windows (W.focusWindow w)
else whenX (isRoot w) $ setFocusX w
-- | Call X to set the keyboard focus details.