mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-22 06:53:47 -07:00
fix xmonad/xmonad#87
switch focus when mouse is entering a workspace but not moving into a window (w' == 0) for magic number 0 in w' == 0 see discussion in https://github.com/xmonad/xmonad/pull/88#pullrequestreview-62489502
This commit is contained in:
@@ -14,6 +14,10 @@
|
|||||||
- Focus did not follow when moving between workspaces (#87)
|
- Focus did not follow when moving between workspaces (#87)
|
||||||
- etc.
|
- etc.
|
||||||
|
|
||||||
|
* Recover old behavior (in 0.12) when `focusFollowsMouse == True`:
|
||||||
|
the focus follows when the mouse enters another workspace
|
||||||
|
but not moving into any window.
|
||||||
|
|
||||||
## 0.13 (February 10, 2017)
|
## 0.13 (February 10, 2017)
|
||||||
|
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
|
@@ -368,7 +368,9 @@ handle e@(CrossingEvent {ev_window = w, ev_event_type = t})
|
|||||||
dpy <- asks display
|
dpy <- asks display
|
||||||
root <- asks theRoot
|
root <- asks theRoot
|
||||||
(_, _, w', _, _, _, _, _) <- io $ queryPointer dpy root
|
(_, _, w', _, _, _, _, _) <- io $ queryPointer dpy root
|
||||||
when (w == w') (focus w)
|
-- when Xlib cannot find a child that contains the pointer,
|
||||||
|
-- it returns None(0)
|
||||||
|
when (w' == 0 || w == w') (focus w)
|
||||||
|
|
||||||
-- left a window, check if we need to focus root
|
-- left a window, check if we need to focus root
|
||||||
handle e@(CrossingEvent {ev_event_type = t})
|
handle e@(CrossingEvent {ev_event_type = t})
|
||||||
|
Reference in New Issue
Block a user