From 66ec028b0056b834442a7ede6544eae8709946c0 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Sat, 25 Nov 2023 12:39:16 -0600 Subject: simplify check for wlr_layer_surface.output --- dwl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dwl.c b/dwl.c index c0c5c08..ea0a791 100644 --- a/dwl.c +++ b/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; } -- cgit v1.2.3