mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-12-18 19:03:18 +00:00
Fix popups that are spawned by popups causing segfaults
This commit is contained in:
parent
7920ba0cd5
commit
dd18b69098
6
dwl.c
6
dwl.c
@ -887,12 +887,12 @@ createnotify(struct wl_listener *listener, void *data)
|
|||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
|
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 = {
|
struct wlr_box pop_box = {
|
||||||
.x = 0,
|
.x = 0,
|
||||||
.y = 0,
|
.y = 0,
|
||||||
.width = c->geom.width,
|
.width = selmon->m.width,
|
||||||
.height = c->geom.height,
|
.height = selmon->m.height,
|
||||||
};
|
};
|
||||||
wlr_xdg_popup_unconstrain_from_box(xdg_surface->popup, &pop_box);
|
wlr_xdg_popup_unconstrain_from_box(xdg_surface->popup, &pop_box);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user