diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-10-16 10:24:15 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-10-16 10:24:15 -0400 |
commit | d19f4f7bf866660d2199cb726bc3708eb42f98dd (patch) | |
tree | e87890c893c24b0d7e483c86ccd804a924996876 | |
parent | Grimshot: a helper for screenshots within sway (diff) | |
download | sway-d19f4f7bf866660d2199cb726bc3708eb42f98dd.tar.gz sway-d19f4f7bf866660d2199cb726bc3708eb42f98dd.tar.zst sway-d19f4f7bf866660d2199cb726bc3708eb42f98dd.zip |
Updates per wlroots layer shell changes
-rw-r--r-- | sway/desktop/layer_shell.c | 7 | ||||
-rw-r--r-- | sway/desktop/output.c | 2 | ||||
-rw-r--r-- | sway/input/seat.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index a9803d21..5f2b74cd 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c | |||
@@ -487,7 +487,9 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) { | |||
487 | struct wlr_layer_surface_v1 *layer_surface = data; | 487 | struct wlr_layer_surface_v1 *layer_surface = data; |
488 | sway_log(SWAY_DEBUG, "new layer surface: namespace %s layer %d anchor %d " | 488 | sway_log(SWAY_DEBUG, "new layer surface: namespace %s layer %d anchor %d " |
489 | "size %dx%d margin %d,%d,%d,%d", | 489 | "size %dx%d margin %d,%d,%d,%d", |
490 | layer_surface->namespace, layer_surface->layer, layer_surface->layer, | 490 | layer_surface->namespace, |
491 | layer_surface->client_pending.layer, | ||
492 | layer_surface->client_pending.layer, | ||
491 | layer_surface->client_pending.desired_width, | 493 | layer_surface->client_pending.desired_width, |
492 | layer_surface->client_pending.desired_height, | 494 | layer_surface->client_pending.desired_height, |
493 | layer_surface->client_pending.margin.top, | 495 | layer_surface->client_pending.margin.top, |
@@ -544,7 +546,8 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) { | |||
544 | sway_layer->output_destroy.notify = handle_output_destroy; | 546 | sway_layer->output_destroy.notify = handle_output_destroy; |
545 | wl_signal_add(&output->events.destroy, &sway_layer->output_destroy); | 547 | wl_signal_add(&output->events.destroy, &sway_layer->output_destroy); |
546 | 548 | ||
547 | wl_list_insert(&output->layers[layer_surface->layer], &sway_layer->link); | 549 | wl_list_insert(&output->layers[layer_surface->client_pending.layer], |
550 | &sway_layer->link); | ||
548 | 551 | ||
549 | // Temporarily set the layer's current state to client_pending | 552 | // Temporarily set the layer's current state to client_pending |
550 | // So that we can easily arrange it | 553 | // So that we can easily arrange it |
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 7f250542..36e406c3 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -375,7 +375,7 @@ bool output_has_opaque_overlay_layer_surface(struct sway_output *output) { | |||
375 | struct wlr_layer_surface_v1 *wlr_layer_surface_v1; | 375 | struct wlr_layer_surface_v1 *wlr_layer_surface_v1; |
376 | wl_list_for_each(wlr_layer_surface_v1, &server.layer_shell->surfaces, link) { | 376 | wl_list_for_each(wlr_layer_surface_v1, &server.layer_shell->surfaces, link) { |
377 | if (wlr_layer_surface_v1->output != output->wlr_output || | 377 | if (wlr_layer_surface_v1->output != output->wlr_output || |
378 | wlr_layer_surface_v1->layer != ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY) { | 378 | wlr_layer_surface_v1->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY) { |
379 | continue; | 379 | continue; |
380 | } | 380 | } |
381 | struct wlr_surface *wlr_surface = wlr_layer_surface_v1->surface; | 381 | struct wlr_surface *wlr_surface = wlr_layer_surface_v1->surface; |
diff --git a/sway/input/seat.c b/sway/input/seat.c index ebd40343..7b0fe67d 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -1120,7 +1120,7 @@ void seat_set_focus_layer(struct sway_seat *seat, | |||
1120 | } | 1120 | } |
1121 | assert(layer->mapped); | 1121 | assert(layer->mapped); |
1122 | seat_set_focus_surface(seat, layer->surface, true); | 1122 | seat_set_focus_surface(seat, layer->surface, true); |
1123 | if (layer->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) { | 1123 | if (layer->current.layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) { |
1124 | seat->focused_layer = layer; | 1124 | seat->focused_layer = layer; |
1125 | } | 1125 | } |
1126 | } | 1126 | } |