return early if couldn't find the popup's parent
This commit is contained in:
parent
19b5d47a9e
commit
9136b6247d
1 changed files with 1 additions and 1 deletions
2
dwl.c
2
dwl.c
|
@ -910,7 +910,7 @@ createnotify(struct wl_listener *listener, void *data)
|
||||||
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
|
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
|
||||||
struct wlr_box box;
|
struct wlr_box box;
|
||||||
int type = toplevel_from_wlr_surface(xdg_surface->surface, &c, &l);
|
int type = toplevel_from_wlr_surface(xdg_surface->surface, &c, &l);
|
||||||
if (!xdg_surface->popup->parent)
|
if (!xdg_surface->popup->parent || type < 0)
|
||||||
return;
|
return;
|
||||||
xdg_surface->surface->data = wlr_scene_xdg_surface_create(
|
xdg_surface->surface->data = wlr_scene_xdg_surface_create(
|
||||||
xdg_surface->popup->parent->data, xdg_surface);
|
xdg_surface->popup->parent->data, xdg_surface);
|
||||||
|
|
Loading…
Reference in a new issue