From 0c51dc4ae49f693fd2eea39d47480e77bb5b849f Mon Sep 17 00:00:00 2001 From: David Roundy Date: Mon, 20 Aug 2007 17:02:25 +0200 Subject: don't refresh when setting focus to already focussed window. darcs-hash:20070820150225-72aca-bd7bc572123ece11ae6b1ebcba4a494d73d2fdfe --- Operations.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v1.2.3