summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/desktop/layer_shell.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index 9289bb4a..b754b1fa 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -301,6 +301,15 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
301} 301}
302 302
303static void unmap(struct sway_layer_surface *sway_layer) { 303static void unmap(struct sway_layer_surface *sway_layer) {
304 struct sway_seat *seat;
305 wl_list_for_each(seat, &server.input->seats, link) {
306 if (seat->focused_layer == sway_layer->layer_surface) {
307 seat_set_focus_layer(seat, NULL);
308 }
309 }
310
311 cursor_rebase_all();
312
304 struct wlr_output *wlr_output = sway_layer->layer_surface->output; 313 struct wlr_output *wlr_output = sway_layer->layer_surface->output;
305 if (wlr_output == NULL) { 314 if (wlr_output == NULL) {
306 return; 315 return;
@@ -311,15 +320,6 @@ static void unmap(struct sway_layer_surface *sway_layer) {
311 } 320 }
312 output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y, 321 output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y,
313 sway_layer->layer_surface->surface, true); 322 sway_layer->layer_surface->surface, true);
314
315 struct sway_seat *seat;
316 wl_list_for_each(seat, &server.input->seats, link) {
317 if (seat->focused_layer == sway_layer->layer_surface) {
318 seat_set_focus_layer(seat, NULL);
319 }
320 }
321
322 cursor_rebase_all();
323} 323}
324 324
325static void handle_destroy(struct wl_listener *listener, void *data) { 325static void handle_destroy(struct wl_listener *listener, void *data) {