summaryrefslogtreecommitdiffstats
path: root/XMonad/Main.hsc
diff options
context:
space:
mode:
authorKlaus Weidner <kweidner@pobox.com>2008-05-02 19:56:03 +0200
committerKlaus Weidner <kweidner@pobox.com>2008-05-02 19:56:03 +0200
commit01b925d43acf8101a955ca7e7f9284a3b21ddf89 (patch)
treeb9a432629c09b605d9269ae442307134615e3e7c /XMonad/Main.hsc
parent3f1d80f16724ab923ebc8df26b9bbb66faa7f885 (diff)
downloadmetatile-01b925d43acf8101a955ca7e7f9284a3b21ddf89.tar
metatile-01b925d43acf8101a955ca7e7f9284a3b21ddf89.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
Diffstat (limited to 'XMonad/Main.hsc')
-rw-r--r--XMonad/Main.hsc3
1 files changed, 2 insertions, 1 deletions
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc
index a0100a6..cecbcec 100644
--- a/XMonad/Main.hsc
+++ b/XMonad/Main.hsc
@@ -98,7 +98,8 @@ xmonad initxmc = do
, normalBorder = nbc
, focusedBorder = fbc
, keyActions = keys xmc xmc
- , buttonActions = mouseBindings xmc xmc }
+ , buttonActions = mouseBindings xmc xmc
+ , mouseFocused = False }
st = XState
{ windowset = initialWinset
, mapped = S.empty