mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-01 04:31:53 -07:00
Focus follows mouse.
This change makes the window under the mouse pointer the focused window. This isn't quite what we want, but it is a step in the right direction. The next step is to somehow inhibit the CrossingEvents generated during workspace and layout switches.
This commit is contained in:
@@ -117,7 +117,11 @@ withServerX f = withDisplay $ \dpy -> do
|
||||
|
||||
-- | Explicitly set the keyboard focus to the given window
|
||||
setFocus :: Window -> X ()
|
||||
setFocus w = withDisplay $ \d -> io $ setInputFocus d w revertToPointerRoot 0
|
||||
setFocus w = do
|
||||
withDisplay $ \d -> io $ setInputFocus d w revertToPointerRoot 0
|
||||
-- This does not use 'windows' intentionally. 'windows' calls refresh,
|
||||
-- which means infinite loops.
|
||||
modify (\s -> s { workspace = W.raiseFocus w (workspace s) })
|
||||
|
||||
-- | Set the focus to the window on top of the stack, or root
|
||||
setTopFocus :: X ()
|
||||
|
Reference in New Issue
Block a user