i3: Focus does not follow window with directional move when focus_follows_mouse is enabled
I’m submitting a…
[x] Bug [ ] Feature Request [ ] Documentation Request [ ] Other (Please describe in detail)
Expected Behavior
I have the following bindings:
bindsym $mod+Control+H move left
bindsym $mod+Control+L move right
When I use these to move a window from e.g. workspace 1 on my laptop display to workspace 2 on my monitor, I would expect the focus to follow the window as it moves. It is the usual behaviour for focus to follow the window as you move it left and right within a workspace, so I think it’s reasonable to expect this to apply when moving it across a workspace with “move left” or “move right” (or even up and down if you have that kind of monitor layout).
Current Behavior
If in my example scenario, there is already one or more windows in workspace 2, the window focus ends up on one of them instead of the one I’m moving. This behaviour is quite annoying because I then have to pause to find out where the focus has moved to, then move it back to the window I was moving so I can continue moving it to the desired location. It’s really not very intuitive.
Reproduction Instructions
To replicate:
- 2 displays needed
- Open one window on a workspace in primary display
- Open a second window on another workspace in the secondary display
- Use “move <left|down|up|right>” to move the window on the primary display to the workspace on the secondary display
- Observe that focus has not followed the window being moved per the usual behaviour
Environment
Output of i3 --moreversion 2>&-
:
i3 version: 4.16
i3 config: https://pastebin.com/mgE6BRwr
- Linux Distribution & Version: Ubuntu 18.04, Linux 4.15.0-38-generic - Are you using a compositor (e.g., xcompmgr or compton): No
I also see that this issue has been raised before in #2257 (but not #809 which is a completely separate issue), and it seems it is definitely not the intended behaviour https://github.com/i3/i3/issues/2257#issuecomment-214448093 and yet it still remains…
Many thanks, Jonathan
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 10
- Comments: 29 (13 by maintainers)
Commits related to this issue
- Fix focus issue when moving windows across outputs Fixes #3518 Tried to add a test but it also succeeds with version before patch Co-Authored-By: Orestis <orestisflo@gmail.com> — committed to orestisfl/i3 by algmyr 3 years ago
- Fix focus issue when moving windows across outputs Fixes #3518 Tried to add a test but it also succeeds with version before patch Co-Authored-By: Orestis <orestisflo@gmail.com> — committed to orestisfl/i3 by algmyr 3 years ago
- Fix focus issue when moving windows across outputs Fixes #3518 This fix avoids the issue of consuming our own warp events by never calling warp on the wrong container. Tried to add a test but it al... — committed to orestisfl/i3 by algmyr 3 years ago
- Fix focus issue when moving windows across outputs Fixes #3518 This fix avoids the issue of consuming our own warp events by never calling warp on the wrong container. Tried to add a test but it al... — committed to orestisfl/i3 by algmyr 3 years ago
- Fix focus issue when moving windows across outputs Fixes #3518 This fix avoids the issue of consuming our own warp events by never calling warp on the wrong container. Tried to add a test but it al... — committed to orestisfl/i3 by algmyr 3 years ago
- Fix focus issue when moving windows across outputs Fixes #3518 This fix avoids the issue of consuming our own warp events by never calling warp on the wrong container. Tried to add a test but it al... — committed to orestisfl/i3 by algmyr 3 years ago
- turn off mouse_warping This is a workaround for focus going to the wrong window when moving a window onto a different monitor. Issue is https://github.com/i3/i3/issues/3518 — committed to kjetilho/setupfiles by kjetilho 3 years ago
- turn off mouse_warping This is a workaround for focus going to the wrong window when moving a window onto a different monitor. Issue is https://github.com/i3/i3/issues/3518 — committed to kjetilho/setupfiles by kjetilho 3 years ago
Same here. I have 4.16.1 too.
I can reproduce this issue with 4.16.1.
Still present in 4.19, but for me
mouse_warping none
is an acceptable workaround. (I have not been able to force the problem to reappear so far, anyway.)Played around a bit and focusing the correct container before doing the workspace back and forth to get the correct events triggered seems to do the right thing superficially. The correct container is focused on the other side, and the workspace indicator is updated which is what the workspace switching is intending to do.
@orestisfl considering you were the one to commit the fix for this years back, do you happen to have any idea if reversing the order of operations here would break anything?
Yes. I have the same issue and it’s a major problem. I want
Unfortunately this is not possible when the config says: focus_follows_mouse yes mouse_warping output
I think it’s
mouse_warping output
that does not allow the pointer to move along window by window by keybind. There should be more options tomouse_warping
, for example “window”.Reopening to keep it separate from #2257 in case the causes are different. I also think that the behavior with mouse_warping is a bit problematic.