diff options
| author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-14 13:10:58 -0600 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-27 23:09:46 -0600 | 
| commit | 6de87121e2cf05119ddbfb501c87766912aa4d0a (patch) | |
| tree | b3a39b04213dacd3ca9b0329e8c15e32d375d66f /dwl.c | |
| parent | bbc00d88a45df249009c9946dfd88285eecac0c5 (diff) | |
destroy popups when we can't get it's parent or they don't have monitor
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| @@ -834,8 +834,10 @@ commitpopup(struct wl_listener *listener, void *data)  		return;  	popup->base->surface->data = wlr_scene_xdg_surface_create(  			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; +	}  	box = type == LayerShell ? l->mon->m : c->mon->w;  	box.x -= (type == LayerShell ? l->scene->node.x : c->geom.x);  	box.y -= (type == LayerShell ? l->scene->node.y : c->geom.y); | 
