mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-08 08:21:00 -04:00
Layer shell: Prevent infinte configure/commit loop
This commit is contained in:
parent
cb4265ac8c
commit
f3c293988e
1 changed files with 7 additions and 0 deletions
7
dwl.c
7
dwl.c
|
|
@ -150,6 +150,7 @@ typedef struct {
|
||||||
struct wl_listener surface_commit;
|
struct wl_listener surface_commit;
|
||||||
|
|
||||||
struct wlr_box geo;
|
struct wlr_box geo;
|
||||||
|
int mapped;
|
||||||
} LayerSurface;
|
} LayerSurface;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
@ -755,6 +756,12 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
|
||||||
wlr_scene_node_reparent(layersurface->scene,
|
wlr_scene_node_reparent(layersurface->scene,
|
||||||
layers[wlr_layer_surface->current.layer]);
|
layers[wlr_layer_surface->current.layer]);
|
||||||
|
|
||||||
|
if (wlr_layer_surface->current.committed == 0 &&
|
||||||
|
layersurface->mapped == wlr_layer_surface->mapped)
|
||||||
|
return;
|
||||||
|
|
||||||
|
layersurface->mapped = wlr_layer_surface->mapped;
|
||||||
|
|
||||||
if (!wlr_output || !(m = wlr_output->data))
|
if (!wlr_output || !(m = wlr_output->data))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue