mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	xdg-toplevel: validate resize_edge
This commit is contained in:
		
							parent
							
								
									1465d238a4
								
							
						
					
					
						commit
						ebd4c83cd6
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -285,6 +285,13 @@ static void xdg_toplevel_handle_resize(struct wl_client *client,
 | 
				
			||||||
	struct wlr_seat_client *seat =
 | 
						struct wlr_seat_client *seat =
 | 
				
			||||||
		wlr_seat_client_from_resource(seat_resource);
 | 
							wlr_seat_client_from_resource(seat_resource);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (edges > XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_RIGHT) {
 | 
				
			||||||
 | 
							wl_resource_post_error(toplevel->base->resource,
 | 
				
			||||||
 | 
								XDG_TOPLEVEL_ERROR_INVALID_RESIZE_EDGE,
 | 
				
			||||||
 | 
								"provided value is not a valid variant of the resize_edge enum");
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!toplevel->base->configured) {
 | 
						if (!toplevel->base->configured) {
 | 
				
			||||||
		wl_resource_post_error(toplevel->base->resource,
 | 
							wl_resource_post_error(toplevel->base->resource,
 | 
				
			||||||
			XDG_SURFACE_ERROR_NOT_CONSTRUCTED,
 | 
								XDG_SURFACE_ERROR_NOT_CONSTRUCTED,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue