Updates per wlroots layer shell changes

This commit is contained in:
Drew DeVault 2019-10-16 10:24:15 -04:00
parent 992726a823
commit d19f4f7bf8
3 changed files with 7 additions and 4 deletions

View file

@ -487,7 +487,9 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
struct wlr_layer_surface_v1 *layer_surface = data; struct wlr_layer_surface_v1 *layer_surface = data;
sway_log(SWAY_DEBUG, "new layer surface: namespace %s layer %d anchor %d " sway_log(SWAY_DEBUG, "new layer surface: namespace %s layer %d anchor %d "
"size %dx%d margin %d,%d,%d,%d", "size %dx%d margin %d,%d,%d,%d",
layer_surface->namespace, layer_surface->layer, layer_surface->layer, layer_surface->namespace,
layer_surface->client_pending.layer,
layer_surface->client_pending.layer,
layer_surface->client_pending.desired_width, layer_surface->client_pending.desired_width,
layer_surface->client_pending.desired_height, layer_surface->client_pending.desired_height,
layer_surface->client_pending.margin.top, layer_surface->client_pending.margin.top,
@ -544,7 +546,8 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
sway_layer->output_destroy.notify = handle_output_destroy; sway_layer->output_destroy.notify = handle_output_destroy;
wl_signal_add(&output->events.destroy, &sway_layer->output_destroy); wl_signal_add(&output->events.destroy, &sway_layer->output_destroy);
wl_list_insert(&output->layers[layer_surface->layer], &sway_layer->link); wl_list_insert(&output->layers[layer_surface->client_pending.layer],
&sway_layer->link);
// Temporarily set the layer's current state to client_pending // Temporarily set the layer's current state to client_pending
// So that we can easily arrange it // So that we can easily arrange it

View file

@ -375,7 +375,7 @@ bool output_has_opaque_overlay_layer_surface(struct sway_output *output) {
struct wlr_layer_surface_v1 *wlr_layer_surface_v1; struct wlr_layer_surface_v1 *wlr_layer_surface_v1;
wl_list_for_each(wlr_layer_surface_v1, &server.layer_shell->surfaces, link) { wl_list_for_each(wlr_layer_surface_v1, &server.layer_shell->surfaces, link) {
if (wlr_layer_surface_v1->output != output->wlr_output || if (wlr_layer_surface_v1->output != output->wlr_output ||
wlr_layer_surface_v1->layer != ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY) { wlr_layer_surface_v1->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY) {
continue; continue;
} }
struct wlr_surface *wlr_surface = wlr_layer_surface_v1->surface; struct wlr_surface *wlr_surface = wlr_layer_surface_v1->surface;

View file

@ -1120,7 +1120,7 @@ void seat_set_focus_layer(struct sway_seat *seat,
} }
assert(layer->mapped); assert(layer->mapped);
seat_set_focus_surface(seat, layer->surface, true); seat_set_focus_surface(seat, layer->surface, true);
if (layer->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) { if (layer->current.layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
seat->focused_layer = layer; seat->focused_layer = layer;
} }
} }