mirror of
https://github.com/swaywm/sway.git
synced 2026-04-25 06:46:24 -04:00
Fix layer surface commit handler
Fixes: c11b5db4d6 ("layer-shell: check `committed` bitmask")
This commit is contained in:
parent
c11b5db4d6
commit
fe4942e078
1 changed files with 9 additions and 8 deletions
|
|
@ -297,18 +297,19 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
|
||||||
if (wlr_output == NULL) {
|
if (wlr_output == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (layer_surface->current.committed == 0) {
|
|
||||||
// The layer surface state didn't change
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct sway_output *output = wlr_output->data;
|
struct sway_output *output = wlr_output->data;
|
||||||
struct wlr_box old_extent = layer->extent;
|
struct wlr_box old_extent = layer->extent;
|
||||||
arrange_layers(output);
|
bool layer_changed =
|
||||||
|
layer_surface->current.committed & WLR_LAYER_SURFACE_V1_STATE_LAYER;
|
||||||
|
bool extent_changed = false;
|
||||||
|
if (layer_surface->current.committed != 0) {
|
||||||
|
arrange_layers(output);
|
||||||
|
|
||||||
|
extent_changed = memcmp(&old_extent, &layer->extent,
|
||||||
|
sizeof(struct wlr_box)) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool extent_changed =
|
|
||||||
memcmp(&old_extent, &layer->extent, sizeof(struct wlr_box)) != 0;
|
|
||||||
bool layer_changed = layer->layer != layer_surface->current.layer;
|
|
||||||
if (layer_changed) {
|
if (layer_changed) {
|
||||||
wl_list_remove(&layer->link);
|
wl_list_remove(&layer->link);
|
||||||
wl_list_insert(&output->layers[layer_surface->current.layer],
|
wl_list_insert(&output->layers[layer_surface->current.layer],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue