return early if couldn't find the popup's parent

このコミットが含まれているのは:
Leonardo Hernández Hernández 2022-12-06 13:34:35 -06:00
コミット 9136b6247d
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: E538897EE11B9624
1個のファイルの変更1行の追加1行の削除

2
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);