From edbacec3aa463531bca1bca5509e2013da54523f Mon Sep 17 00:00:00 2001 From: Anders Engstrom Date: Sat, 30 May 2009 20:57:52 +0200 Subject: UpdatePointer - Don't warp while dragging with mouse Ignore-this: 4c3769dc96041608660789573b670c23 darcs-hash:20090530185752-8978f-aed8c6218dc5804519ea770f31f932e07c68d060.gz --- XMonad/Actions/UpdatePointer.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'XMonad/Actions/UpdatePointer.hs') diff --git a/XMonad/Actions/UpdatePointer.hs b/XMonad/Actions/UpdatePointer.hs index f79d068..2068e33 100644 --- a/XMonad/Actions/UpdatePointer.hs +++ b/XMonad/Actions/UpdatePointer.hs @@ -26,6 +26,7 @@ module XMonad.Actions.UpdatePointer import XMonad import Control.Monad import XMonad.StackSet (member, peek, screenDetail, current) +import Data.Maybe -- $usage -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: @@ -66,8 +67,10 @@ updatePointer p = do root <- asks theRoot mouseIsMoving <- asks mouseFocused (_sameRoot,_,currentWindow,rootx,rooty,_,_,_) <- io $ queryPointer dpy root + drag <- gets dragging unless (pointWithin (fi rootx) (fi rooty) rect || mouseIsMoving + || isJust drag || not (currentWindow `member` ws || currentWindow == none)) $ case p of Nearest -> do -- cgit v1.2.3