diff options
author | Klaus Weidner <kweidner@pobox.com> | 2008-05-02 19:56:03 +0200 |
---|---|---|
committer | Klaus Weidner <kweidner@pobox.com> | 2008-05-02 19:56:03 +0200 |
commit | 2efcafc28cc92551fc88678c159d6352aa2cb37f (patch) | |
tree | b9a432629c09b605d9269ae442307134615e3e7c /XMonad/Core.hs | |
parent | 534977239535ba58f4e9f2b3482e3a42410423ed (diff) | |
download | xmonad-2efcafc28cc92551fc88678c159d6352aa2cb37f.tar.gz xmonad-2efcafc28cc92551fc88678c159d6352aa2cb37f.tar.xz xmonad-2efcafc28cc92551fc88678c159d6352aa2cb37f.zip |
Remember if focus changes were caused by mouse actions or by key commands
If the user used the mouse to change window focus (moving into or clicking on a
window), this should be handled differently than focus changes due to keyboard
commands. Specifically, it's inappropriate to discard window enter/leave events
while the mouse is moving. This fixes the bug where a fast mouse motion across
multiple windows resulted in the wrong window keeping focus.
It's also helpful information for contrib modules such as UpdatePointer - it's
supposed to move the mouse pointer only in response to keyboard actions, not if
the user was moving the mouse.
darcs-hash:20080502175603-e41d7-0ac41e5353fcd8aed71ee3beb7f5511337225155.gz
Diffstat (limited to 'XMonad/Core.hs')
-rw-r--r-- | XMonad/Core.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/XMonad/Core.hs b/XMonad/Core.hs index 26f2617..4b52439 100644 --- a/XMonad/Core.hs +++ b/XMonad/Core.hs @@ -69,6 +69,7 @@ data XConf = XConf -- ^ a mapping of key presses to actions , buttonActions :: !(M.Map (KeyMask, Button) (Window -> X ())) -- ^ a mapping of button presses to actions + , mouseFocused :: !Bool -- ^ was refocus caused by mouse action? } -- todo, better name |