mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	shells: Resize on commit if geometry x/y changes
Client-side decorations lead to changes to y position, so make sure we catch that.
This commit is contained in:
		
							parent
							
								
									5a4a7bc0da
								
							
						
					
					
						commit
						f8dd7df1f5
					
				
					 2 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -284,7 +284,9 @@ static void handle_commit(struct wl_listener *listener, void *data) {
 | 
				
			||||||
		wlr_xdg_surface_get_geometry(xdg_surface, &new_geo);
 | 
							wlr_xdg_surface_get_geometry(xdg_surface, &new_geo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ((new_geo.width != view->geometry.width ||
 | 
							if ((new_geo.width != view->geometry.width ||
 | 
				
			||||||
					new_geo.height != view->geometry.height)) {
 | 
										new_geo.height != view->geometry.height ||
 | 
				
			||||||
 | 
										new_geo.x != view->geometry.x ||
 | 
				
			||||||
 | 
										new_geo.y != view->geometry.y)) {
 | 
				
			||||||
			// The view has unexpectedly sent a new size
 | 
								// The view has unexpectedly sent a new size
 | 
				
			||||||
			desktop_damage_view(view);
 | 
								desktop_damage_view(view);
 | 
				
			||||||
			view_update_size(view, new_geo.width, new_geo.height);
 | 
								view_update_size(view, new_geo.width, new_geo.height);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -373,7 +373,9 @@ static void handle_commit(struct wl_listener *listener, void *data) {
 | 
				
			||||||
		get_geometry(view, &new_geo);
 | 
							get_geometry(view, &new_geo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ((new_geo.width != view->geometry.width ||
 | 
							if ((new_geo.width != view->geometry.width ||
 | 
				
			||||||
					new_geo.height != view->geometry.height)) {
 | 
										new_geo.height != view->geometry.height ||
 | 
				
			||||||
 | 
										new_geo.x != view->geometry.x ||
 | 
				
			||||||
 | 
										new_geo.y != view->geometry.y)) {
 | 
				
			||||||
			// The view has unexpectedly sent a new size
 | 
								// The view has unexpectedly sent a new size
 | 
				
			||||||
			// eg. The Firefox "Save As" dialog when downloading a file
 | 
								// eg. The Firefox "Save As" dialog when downloading a file
 | 
				
			||||||
			desktop_damage_view(view);
 | 
								desktop_damage_view(view);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue