mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-11-03 09:01:45 -05:00 
			
		
		
		
	fix crash of Firefox when opening a popup larger than its size
This commit is contained in:
		
							parent
							
								
									294fb324d8
								
							
						
					
					
						commit
						1dfd867d9c
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		
							
								
								
									
										6
									
								
								dwl.c
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								dwl.c
									
										
									
									
									
								
							| 
						 | 
					@ -882,9 +882,11 @@ createnotify(struct wl_listener *listener, void *data)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
 | 
						if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
 | 
				
			||||||
		struct wlr_box box;
 | 
							struct wlr_box box;
 | 
				
			||||||
		if (!(c = client_from_popup(xdg_surface->popup)))
 | 
							if (!(c = client_from_popup(xdg_surface->popup)) || !c->mon)
 | 
				
			||||||
			return;
 | 
								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);
 | 
							wlr_xdg_popup_unconstrain_from_box(xdg_surface->popup, &box);
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	} else if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_NONE)
 | 
						} else if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_NONE)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue