aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorDaniel Schoepe <daniel.schoepe@gmail.com>2010-02-22 00:47:35 +0100
committerDaniel Schoepe <daniel.schoepe@gmail.com>2010-02-22 00:47:35 +0100
commit01419b795d5b66f80bb7a372c28b7254cf0ffeb1 (patch)
tree89d1e331dea0cd31b199e9738f98e3d5dd4d54a0 /XMonad
parent10e4f1a1c9f9e32b9715edaafb0c58c3d57d0d7f (diff)
downloadXMonadContrib-01419b795d5b66f80bb7a372c28b7254cf0ffeb1.tar.gz
XMonadContrib-01419b795d5b66f80bb7a372c28b7254cf0ffeb1.tar.xz
XMonadContrib-01419b795d5b66f80bb7a372c28b7254cf0ffeb1.zip
Prevent possible pattern match failure in X.A.UpdateFocus
Ignore-this: fe132d248db01076a1038e9e8acbdf42 darcs-hash:20100221234735-7f603-56b9bbdc90ef75c5afe5088d17a15efde7bd9aa7.gz
Diffstat (limited to 'XMonad')
-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)