aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions/UpdateFocus.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Actions/UpdateFocus.hs')
-rw-r--r--XMonad/Actions/UpdateFocus.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/XMonad/Actions/UpdateFocus.hs b/XMonad/Actions/UpdateFocus.hs
index ab2e2b1..ead23d8 100644
--- a/XMonad/Actions/UpdateFocus.hs
+++ b/XMonad/Actions/UpdateFocus.hs
@@ -44,10 +44,10 @@ focusOnMouseMove (MotionEvent { ev_x = x, ev_y = y, ev_window = root }) = do
-- check only every 15 px to avoid excessive calls to translateCoordinates
when (x `mod` 15 == 0 || y `mod` 15 == 0) $ do
dpy <- asks display
- Just foc <- withWindowSet $ return . W.peek
+ foc <- withWindowSet $ return . W.peek
-- get the window under the pointer:
(_,_,_,w) <- io $ translateCoordinates dpy root root (fromIntegral x) (fromIntegral y)
- when (foc /= w) $ focus w
+ when (foc /= Just w) $ focus w
return (All True)
focusOnMouseMove _ = return (All True)