aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-06 13:34:35 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-06 13:34:35 -0600
commit9136b6247d186790926bdee32d0a17d668ff8924 (patch)
treead993fc49592b45616d42e7883664b0c7d464798 /dwl.c
parent19b5d47a9e712b980749b7b9e1c562701d5afafc (diff)
return early if couldn't find the popup's parent
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index 1dae796..b26743c 100644
--- a/dwl.c
+++ b/dwl.c
@@ -910,7 +910,7 @@ createnotify(struct wl_listener *listener, void *data)
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
struct wlr_box box;
int type = toplevel_from_wlr_surface(xdg_surface->surface, &c, &l);
- if (!xdg_surface->popup->parent)
+ if (!xdg_surface->popup->parent || type < 0)
return;
xdg_surface->surface->data = wlr_scene_xdg_surface_create(
xdg_surface->popup->parent->data, xdg_surface);