aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/layer_shell.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/desktop/layer_shell.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/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index 1fae5db2..a4f7f928 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -176,7 +176,7 @@ void arrange_layers(struct sway_output *output) {
176 sizeof(struct wlr_box)) != 0) { 176 sizeof(struct wlr_box)) != 0) {
177 wlr_log(WLR_DEBUG, "Usable area changed, rearranging output"); 177 wlr_log(WLR_DEBUG, "Usable area changed, rearranging output");
178 memcpy(&output->usable_area, &usable_area, sizeof(struct wlr_box)); 178 memcpy(&output->usable_area, &usable_area, sizeof(struct wlr_box));
179 container_set_dirty(output->swayc); 179 arrange_output(output->swayc);
180 } 180 }
181 181
182 // Arrange non-exlusive surfaces from top->bottom 182 // Arrange non-exlusive surfaces from top->bottom
@@ -247,7 +247,6 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
247 layer_surface->surface, false); 247 layer_surface->surface, false);
248 } 248 }
249 249
250 arrange_windows(output->swayc);
251 transaction_commit_dirty(); 250 transaction_commit_dirty();
252} 251}
253 252