mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Use assertions instead of guard.
This commit is contained in:
		
							parent
							
								
									e7fff4f560
								
							
						
					
					
						commit
						b1cdd2b4b3
					
				
					 1 changed files with 6 additions and 8 deletions
				
			
		| 
						 | 
					@ -518,18 +518,16 @@ void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface) {
 | 
					void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface) {
 | 
				
			||||||
	if (surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL
 | 
						assert(surface->toplevel);
 | 
				
			||||||
		&& surface->toplevel) {
 | 
						assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
 | 
				
			||||||
	xdg_toplevel_send_close(surface->toplevel->resource);
 | 
						xdg_toplevel_send_close(surface->toplevel->resource);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wlr_xdg_popup_destroy(struct wlr_xdg_surface *surface) {
 | 
					void wlr_xdg_popup_destroy(struct wlr_xdg_surface *surface) {
 | 
				
			||||||
	if (surface->role == WLR_XDG_SURFACE_ROLE_POPUP
 | 
						assert(surface->popup);
 | 
				
			||||||
		&& surface->popup) {
 | 
						assert(surface->role == WLR_XDG_SURFACE_ROLE_POPUP);
 | 
				
			||||||
	xdg_popup_send_popup_done(surface->popup->resource);
 | 
						xdg_popup_send_popup_done(surface->popup->resource);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void xdg_popup_get_position(struct wlr_xdg_popup *popup,
 | 
					static void xdg_popup_get_position(struct wlr_xdg_popup *popup,
 | 
				
			||||||
		double *popup_sx, double *popup_sy) {
 | 
							double *popup_sx, double *popup_sy) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue