mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-05 07:15:31 -04:00
destroy popups when we can't get it's parent or they don't have monitor
This commit is contained in:
parent
5e6a530d8b
commit
be561a778e
1 changed files with 3 additions and 1 deletions
4
dwl.c
4
dwl.c
|
|
@ -832,8 +832,10 @@ commitpopup(struct wl_listener *listener, void *data)
|
||||||
return;
|
return;
|
||||||
popup->base->surface->data = wlr_scene_xdg_surface_create(
|
popup->base->surface->data = wlr_scene_xdg_surface_create(
|
||||||
popup->parent->data, popup->base);
|
popup->parent->data, popup->base);
|
||||||
if ((l && !l->mon) || (c && !c->mon))
|
if ((l && !l->mon) || (c && !c->mon)) {
|
||||||
|
wlr_xdg_popup_destroy(popup);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
box = type == LayerShell ? l->mon->m : c->mon->w;
|
box = type == LayerShell ? l->mon->m : c->mon->w;
|
||||||
box.x -= (type == LayerShell ? l->scene->node.x : c->geom.x);
|
box.x -= (type == LayerShell ? l->scene->node.x : c->geom.x);
|
||||||
box.y -= (type == LayerShell ? l->scene->node.y : c->geom.y);
|
box.y -= (type == LayerShell ? l->scene->node.y : c->geom.y);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue