aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2021-09-05 16:09:26 -0500
committerDevin J. Pohly <djpohly@gmail.com>2021-09-08 23:24:11 -0500
commitbe6f573b4ef723a3985489b0ac0eb035d7c34420 (patch)
treec06b3051911500e1c1f9b78ef70df0dca06059a0
parent1b38801eef319a9f8b618bf29564104af6b0a39d (diff)
use scene to keep track of LayerSurfaces' layers
-rw-r--r--dwl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/dwl.c b/dwl.c
index 2f4bb4c..de4e573 100644
--- a/dwl.c
+++ b/dwl.c
@@ -156,7 +156,6 @@ typedef struct {
struct wl_listener surface_commit;
struct wlr_box geo;
- enum zwlr_layer_shell_v1_layer layer;
} LayerSurface;
typedef struct {
@@ -764,16 +763,14 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
if (!wlr_output)
return;
-
m = wlr_output->data;
- arrangelayers(m);
- if (layersurface->layer != wlr_layer_surface->current.layer) {
+ if (layers[wlr_layer_surface->current.layer] != layersurface->scene) {
wl_list_remove(&layersurface->link);
wl_list_insert(&m->layers[wlr_layer_surface->current.layer],
&layersurface->link);
- layersurface->layer = wlr_layer_surface->current.layer;
}
+ arrangelayers(m);
}
void