diff options
author | Anders Engstrom <ankaan@gmail.com> | 2009-05-30 20:57:52 +0200 |
---|---|---|
committer | Anders Engstrom <ankaan@gmail.com> | 2009-05-30 20:57:52 +0200 |
commit | edbacec3aa463531bca1bca5509e2013da54523f (patch) | |
tree | b09489715891007eb2c46ed16b75deed72005741 /XMonad | |
parent | 773e9d3df02804275c5a9013c53edb42c55e3eef (diff) | |
download | XMonadContrib-edbacec3aa463531bca1bca5509e2013da54523f.tar.gz XMonadContrib-edbacec3aa463531bca1bca5509e2013da54523f.tar.xz XMonadContrib-edbacec3aa463531bca1bca5509e2013da54523f.zip |
UpdatePointer - Don't warp while dragging with mouse
Ignore-this: 4c3769dc96041608660789573b670c23
darcs-hash:20090530185752-8978f-aed8c6218dc5804519ea770f31f932e07c68d060.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Actions/UpdatePointer.hs | 3 |
1 files changed, 3 insertions, 0 deletions
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 |