mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Do not remove the commit listener
This commit is contained in:
		
							parent
							
								
									d09d01236b
								
							
						
					
					
						commit
						3c6f2f29bf
					
				
					 2 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -28,6 +28,8 @@ struct roots_xdg_surface_v6 {
 | 
			
		|||
	struct wl_listener request_move;
 | 
			
		||||
	struct wl_listener request_resize;
 | 
			
		||||
	struct wl_listener request_show_window_menu;
 | 
			
		||||
 | 
			
		||||
	bool initialized;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct roots_xwayland_surface {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -72,9 +72,11 @@ static void handle_commit(struct wl_listener *listener, void *data) {
 | 
			
		|||
		wl_container_of(listener, roots_xdg_surface, commit);
 | 
			
		||||
	struct roots_view *view = roots_xdg_surface->view;
 | 
			
		||||
 | 
			
		||||
	if (!roots_xdg_surface->initialized) {
 | 
			
		||||
		bool centered = view_center(view);
 | 
			
		||||
		if (centered) {
 | 
			
		||||
		wl_list_remove(&listener->link);
 | 
			
		||||
			roots_xdg_surface->initialized = true;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue