mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
do not check if a layer surface has monitor on commit
We do not allow creating them w/o monitor and they are destroyed when destroying their monitor
This commit is contained in:
parent
01a237bd5c
commit
9cb1ece6cc
1 changed files with 0 additions and 6 deletions
6
dwl.c
6
dwl.c
|
@ -710,14 +710,8 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
LayerSurface *layersurface = wl_container_of(listener, layersurface, surface_commit);
|
LayerSurface *layersurface = wl_container_of(listener, layersurface, surface_commit);
|
||||||
struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;
|
struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;
|
||||||
struct wlr_output *wlr_output = wlr_layer_surface->output;
|
|
||||||
struct wlr_scene_tree *layer = layers[layermap[wlr_layer_surface->current.layer]];
|
struct wlr_scene_tree *layer = layers[layermap[wlr_layer_surface->current.layer]];
|
||||||
|
|
||||||
/* For some reason this layersurface have no monitor, this can be because
|
|
||||||
* its monitor has just been destroyed */
|
|
||||||
if (!wlr_output || !(layersurface->mon = wlr_output->data))
|
|
||||||
return;
|
|
||||||
|
|
||||||
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);
|
||||||
|
|
Loading…
Reference in a new issue