diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-11-25 12:39:16 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-11-25 19:05:27 -0600 |
commit | 66ec028b0056b834442a7ede6544eae8709946c0 (patch) | |
tree | 0ac976dd3df97495f241687b8b17fd998f5d945d | |
parent | 1f10e69b4ccaf5ba335b4584db3c42190b45ffe6 (diff) |
simplify check for wlr_layer_surface.output
-rw-r--r-- | dwl.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } |