summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-06 13:31:48 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-06 13:31:48 -0600
commit19b5d47a9e712b980749b7b9e1c562701d5afafc (patch)
treee4833f00500cd18f511810c25ffbcc0a2214663c
parentc9a0a8bf6de9130655342e362a5a9f09c6a7fd08 (diff)
fix popups appearing outside the monitor
and a potentially crash
-rw-r--r--dwl.c2
1 files changed, 1 insertions, 1 deletions
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);