simplify check for wlr_layer_surface.output
This commit is contained in:
parent
1f10e69b4c
commit
66ec028b00
1 changed files with 2 additions and 4 deletions
6
dwl.c
6
dwl.c
|
@ -807,10 +807,8 @@ createlayersurface(struct wl_listener *listener, void *data)
|
|||
struct wlr_layer_surface_v1_state old_state;
|
||||
struct wlr_scene_tree *l = layers[layermap[wlr_layer_surface->pending.layer]];
|
||||
|
||||
if (!wlr_layer_surface->output)
|
||||
wlr_layer_surface->output = selmon ? selmon->wlr_output : NULL;
|
||||
|
||||
if (!wlr_layer_surface->output) {
|
||||
if (!wlr_layer_surface->output
|
||||
&& !(wlr_layer_surface->output = selmon ? selmon->wlr_output : NULL)) {
|
||||
wlr_layer_surface_v1_destroy(wlr_layer_surface);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue