From 19b5d47a9e712b980749b7b9e1c562701d5afafc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Tue, 6 Dec 2022 13:31:48 -0600 Subject: [PATCH] fix popups appearing outside the monitor and a potentially crash --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 3d71d19..1dae796 100644 --- a/dwl.c +++ b/dwl.c @@ -914,7 +914,7 @@ createnotify(struct wl_listener *listener, void *data) return; xdg_surface->surface->data = wlr_scene_xdg_surface_create( xdg_surface->popup->parent->data, xdg_surface); - if ((!l || !l->mon) || (!c || !c->mon)) + if ((l && !l->mon) || (c && !c->mon)) return; box = type == LayerShell ? l->mon->m : c->mon->w; box.x -= (type == LayerShell ? l->geom.x : c->geom.x);