
Hello, the attached patch fixes an issue that had been bugging me - in focus-follows-mouse mode, the input focus sometimes lagged behind the mouse pointer, and as a result I was closing or typing into the wrong window. Let me know in case there's a better way to approach this, I'm still new to haskell and xmonad. I'll send a related patch to the UpdatePointer contrib module separately. -Klaus 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.