From f3387c295119d8cd3c73d894261ae43b1b002dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Thu, 23 Nov 2023 14:19:10 -0600 Subject: [PATCH] chase layer-shell new_surface changes (wlroots!4265) References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4265 --- dwl.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/dwl.c b/dwl.c index 36fa6d0..d5045e9 100644 --- a/dwl.c +++ b/dwl.c @@ -835,15 +835,6 @@ createlayersurface(struct wl_listener *listener, void *data) wl_list_insert(&layersurface->mon->layers[wlr_layer_surface->pending.layer], &layersurface->link); - - /* Temporarily set the layer's current state to pending - * so that we can easily arrange it - */ - old_state = wlr_layer_surface->current; - wlr_layer_surface->current = wlr_layer_surface->pending; - layersurface->mapped = 1; - arrangelayers(layersurface->mon); - wlr_layer_surface->current = old_state; } void @@ -1496,6 +1487,16 @@ void maplayersurfacenotify(struct wl_listener *listener, void *data) { LayerSurface *l = wl_container_of(listener, l, map); + struct wlr_layer_surface_v1_state old_state; + + /* Temporarily set the layer's current state to pending + * so that we can easily arrange it + */ + old_state = l->layer_surface->current; + l->layer_surface->current = l->layer_surface->pending; + l->mapped = 1; + arrangelayers(l->mon); + l->layer_surface->current = old_state; motionnotify(0); }