From 01419b795d5b66f80bb7a372c28b7254cf0ffeb1 Mon Sep 17 00:00:00 2001 From: Daniel Schoepe Date: Mon, 22 Feb 2010 00:47:35 +0100 Subject: Prevent possible pattern match failure in X.A.UpdateFocus Ignore-this: fe132d248db01076a1038e9e8acbdf42 darcs-hash:20100221234735-7f603-56b9bbdc90ef75c5afe5088d17a15efde7bd9aa7.gz --- XMonad/Actions/UpdateFocus.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'XMonad') 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) -- cgit v1.2.3