aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/move.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-22 17:57:32 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-22 18:02:33 +1000
commitf04b8f0061c410ea5d0a85910fd9478082112088 (patch)
tree1a6e61fdff5749a6ec878580b18c25abd2f524b9 /sway/commands/move.c
parentMerge pull request #2913 from emersion/fix-swaybar-hotplug (diff)
downloadsway-f04b8f0061c410ea5d0a85910fd9478082112088.tar.gz
sway-f04b8f0061c410ea5d0a85910fd9478082112088.tar.zst
sway-f04b8f0061c410ea5d0a85910fd9478082112088.zip
Fix crash when moving a container to a fullscreen workspace
Setting normal focus to the fullscreen view causes the old workspace to start destroying. We then set focus to the old workspace which is no longer attached in the tree. As we are only setting focus_inactive on the fullscreen container, the fix uses seat_set_raw_focus to avoid all the additional behaviour that comes with it such as destroying the old workspace.
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r--sway/commands/move.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index a5b7f661..e0a958bf 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -108,7 +108,7 @@ static void workspace_focus_fullscreen(struct sway_workspace *workspace) {
108 if (focus_ws == workspace) { 108 if (focus_ws == workspace) {
109 struct sway_node *new_focus = 109 struct sway_node *new_focus =
110 seat_get_focus_inactive(seat, &workspace->fullscreen->node); 110 seat_get_focus_inactive(seat, &workspace->fullscreen->node);
111 seat_set_focus(seat, new_focus); 111 seat_set_raw_focus(seat, new_focus);
112 } 112 }
113 } 113 }
114} 114}