Fix popups that are spawned by popups causing segfaults

This commit is contained in:
Palanix 2022-01-18 21:19:17 +01:00
parent 7920ba0cd5
commit dd18b69098

6
dwl.c
View File

@ -887,12 +887,12 @@ createnotify(struct wl_listener *listener, void *data)
Client *c;
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
Client *c = wlr_xdg_surface_from_wlr_surface(xdg_surface->popup->parent)->data;
Monitor *selmon = xytomon(cursor->x, cursor->y);
struct wlr_box pop_box = {
.x = 0,
.y = 0,
.width = c->geom.width,
.height = c->geom.height,
.width = selmon->m.width,
.height = selmon->m.height,
};
wlr_xdg_popup_unconstrain_from_box(xdg_surface->popup, &pop_box);
return;