aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-31 21:34:16 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-31 21:39:28 +1000
commitdce549c5378d5d572b8996a7873629df63c45259 (patch)
treebbabf1993a27b2c4a06813b945830384dee9c97f /sway/input/seat.c
parentMerge pull request #2537 from ianyfan/commands (diff)
downloadsway-dce549c5378d5d572b8996a7873629df63c45259.tar.gz
sway-dce549c5378d5d572b8996a7873629df63c45259.tar.zst
sway-dce549c5378d5d572b8996a7873629df63c45259.zip
Don't send never-ending transactions when a focused layer surface commits
This moves the arrange_windows call into the arrange_layers function, where we know the output actually needs to be arranged. Additionally, we shouldn't set focus to the parent of an unknown container type, because the parent may be an output and this causes a crash because outputs can't have direct focus. Fixes #2543
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 36e1d232..5af9e88a 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -779,7 +779,7 @@ void seat_set_focus_layer(struct sway_seat *seat,
779 wlr_log(WLR_DEBUG, "Returning focus to %p %s '%s'", previous, 779 wlr_log(WLR_DEBUG, "Returning focus to %p %s '%s'", previous,
780 container_type_to_str(previous->type), previous->name); 780 container_type_to_str(previous->type), previous->name);
781 // Hack to get seat to re-focus the return value of get_focus 781 // Hack to get seat to re-focus the return value of get_focus
782 seat_set_focus(seat, previous->parent); 782 seat_set_focus(seat, NULL);
783 seat_set_focus(seat, previous); 783 seat_set_focus(seat, previous);
784 } 784 }
785 return; 785 return;