aboutsummaryrefslogtreecommitdiffstats
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
commit4fdb665b703e30aa308eeca955c0697c041d5465 (patch)
tree8df2a8c90f8a6278636d1d5f4b1984ef2a2f36c2
parentd043859d32830efd779981bff4260e33e1b4b4bf (diff)
downloadxmonad-4fdb665b703e30aa308eeca955c0697c041d5465.tar.gz
xmonad-4fdb665b703e30aa308eeca955c0697c041d5465.tar.xz
xmonad-4fdb665b703e30aa308eeca955c0697c041d5465.zip
don't refresh when setting focus to already focussed window.
darcs-hash:20070820150225-72aca-bd7bc572123ece11ae6b1ebcba4a494d73d2fdfe.gz
-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.