summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-08-20 17:02:25 +0200
committerDavid Roundy <droundy@darcs.net>2007-08-20 17:02:25 +0200
commit0c51dc4ae49f693fd2eea39d47480e77bb5b849f (patch)
tree8df2a8c90f8a6278636d1d5f4b1984ef2a2f36c2
parent05ae4c679e249fef3c4babf91c3aeaaa6c14023c (diff)
downloadmetatile-0c51dc4ae49f693fd2eea39d47480e77bb5b849f.tar
metatile-0c51dc4ae49f693fd2eea39d47480e77bb5b849f.zip
don't refresh when setting focus to already focussed window.
darcs-hash:20070820150225-72aca-bd7bc572123ece11ae6b1ebcba4a494d73d2fdfe
-rw-r--r--Operations.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs
index 5441476..ff6c19c 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -291,7 +291,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 windows (W.focusWindow w)
+ if W.member w s then when (W.peek s /= Just w) $ windows (W.focusWindow w)
else whenX (isRoot w) $ setFocusX w
-- | Call X to set the keyboard focus details.