mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
ipc: prevent emitting a workspace::focus event when moving a container to a different workspace or output
When a container is moved from, say, workspace 1 to workspace 2, workspace 2 is focused in order to arrange the windows before focus is moved back to workspace 1, which caused a workspace:focus event from workspace 2 to workspace 1 to be emitted. This commit inhibits that event.
This commit is contained in:
parent
b2ac234569
commit
03eaf444a4
5 changed files with 11 additions and 11 deletions
|
|
@ -98,7 +98,7 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
|
|||
container_move_to(current, destination);
|
||||
struct sway_container *focus = seat_get_focus_inactive(
|
||||
config->handler_context.seat, old_parent);
|
||||
seat_set_focus(config->handler_context.seat, focus);
|
||||
seat_set_focus_warp(config->handler_context.seat, focus, true, false);
|
||||
container_reap_empty(old_parent);
|
||||
container_reap_empty(destination->parent);
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
|
|||
struct sway_container *old_parent = current->parent;
|
||||
struct sway_container *old_ws = container_parent(current, C_WORKSPACE);
|
||||
container_move_to(current, focus);
|
||||
seat_set_focus(config->handler_context.seat, old_parent);
|
||||
seat_set_focus_warp(config->handler_context.seat, old_parent, true, false);
|
||||
container_reap_empty(old_parent);
|
||||
container_reap_empty(focus->parent);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue