return early if a layersurface didn't commit something
This commit is contained in:
parent
9cb1ece6cc
commit
b100b446b8
1 changed files with 5 additions and 5 deletions
10
dwl.c
10
dwl.c
|
@ -712,6 +712,11 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
|
||||||
struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;
|
struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;
|
||||||
struct wlr_scene_tree *layer = layers[layermap[wlr_layer_surface->current.layer]];
|
struct wlr_scene_tree *layer = layers[layermap[wlr_layer_surface->current.layer]];
|
||||||
|
|
||||||
|
if (wlr_layer_surface->current.committed == 0
|
||||||
|
&& layersurface->mapped == wlr_layer_surface->surface->mapped)
|
||||||
|
return;
|
||||||
|
layersurface->mapped = wlr_layer_surface->surface->mapped;
|
||||||
|
|
||||||
if (layer != layersurface->scene->node.parent) {
|
if (layer != layersurface->scene->node.parent) {
|
||||||
wlr_scene_node_reparent(&layersurface->scene->node, layer);
|
wlr_scene_node_reparent(&layersurface->scene->node, layer);
|
||||||
wl_list_remove(&layersurface->link);
|
wl_list_remove(&layersurface->link);
|
||||||
|
@ -721,11 +726,6 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
|
||||||
< ZWLR_LAYER_SHELL_V1_LAYER_TOP ? layers[LyrTop] : layer));
|
< ZWLR_LAYER_SHELL_V1_LAYER_TOP ? layers[LyrTop] : layer));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wlr_layer_surface->current.committed == 0
|
|
||||||
&& layersurface->mapped == wlr_layer_surface->surface->mapped)
|
|
||||||
return;
|
|
||||||
layersurface->mapped = wlr_layer_surface->surface->mapped;
|
|
||||||
|
|
||||||
arrangelayers(layersurface->mon);
|
arrangelayers(layersurface->mon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue