diff options
| author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-03-17 17:02:03 -0600 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-03-17 21:28:07 -0600 | 
| commit | 1dfd867d9caa61d9f3fabf695a72b2fea35b6193 (patch) | |
| tree | 5b04bbb4b1343a57587b93433f0268b6b2e59b9e | |
| parent | 294fb324d8f67c33552b15d3f1f79fe524d5f8fd (diff) | |
fix crash of Firefox when opening a popup larger than its size
| -rw-r--r-- | dwl.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| @@ -882,9 +882,11 @@ createnotify(struct wl_listener *listener, void *data)  	if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {  		struct wlr_box box; -		if (!(c = client_from_popup(xdg_surface->popup))) +		if (!(c = client_from_popup(xdg_surface->popup)) || !c->mon)  			return; -		client_get_geometry(c, &box); +		box = c->mon->m; +		box.x -= c->geom.x; +		box.y -= c->geom.y;  		wlr_xdg_popup_unconstrain_from_box(xdg_surface->popup, &box);  		return;  	} else if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_NONE) | 
