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 also succeeds with version before patch, see #4604 for discussion Co-Authored-By: Orestis <orestisflo@gmail.com>
This commit is contained in:
parent
38cf8a21ef
commit
863a9eada4
1
release-notes/bugfixes/2-fix-focus-wrap
Normal file
1
release-notes/bugfixes/2-fix-focus-wrap
Normal file
@ -0,0 +1 @@
|
||||
fix focus when moving container between outputs with mouse warp and focus_follows_mouse
|
13
src/move.c
13
src/move.c
@ -228,10 +228,19 @@ static void move_to_output_directed(Con *con, direction_t direction) {
|
||||
* the focused container, con, is now a child of ws. To work around this
|
||||
* and still produce the correct workspace focus events (see
|
||||
* 517-regress-move-direction-ipc.t) we need to temporarily set focused
|
||||
* to the old workspace. */
|
||||
* to the old workspace.
|
||||
*
|
||||
* The following happen:
|
||||
* 1. Focus con to push it on the top of the focus stack in its new
|
||||
* workspace
|
||||
* 2. Set focused to the old workspace to force workspace_show to
|
||||
* execute
|
||||
* 3. workspace_show will descend focus and target our con for
|
||||
* focusing. This also ensures that the mouse warps correctly.
|
||||
* See: #3518. */
|
||||
con_focus(con);
|
||||
focused = old_ws;
|
||||
workspace_show(ws);
|
||||
con_focus(con);
|
||||
}
|
||||
|
||||
/* force re-painting the indicators */
|
||||
|
Loading…
Reference in New Issue
Block a user