mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	view: fix regression whereby cursor is not updated
...on view destruction because focus_change_notify() in seat.c changes server->active_view so the logic introduced by6c6e406(which checks if view =! active_view) is no longer right. The glitches described in the commit below have not come back.6c6e406507Fixes #1393
This commit is contained in:
		
							parent
							
								
									c066821046
								
							
						
					
					
						commit
						f73e9ded1c
					
				
					 1 changed files with 1 additions and 6 deletions
				
			
		| 
						 | 
					@ -2046,7 +2046,6 @@ view_destroy(struct view *view)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	assert(view);
 | 
						assert(view);
 | 
				
			||||||
	struct server *server = view->server;
 | 
						struct server *server = view->server;
 | 
				
			||||||
	bool need_cursor_update = false;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (view->mappable.connected) {
 | 
						if (view->mappable.connected) {
 | 
				
			||||||
		mappable_disconnect(&view->mappable);
 | 
							mappable_disconnect(&view->mappable);
 | 
				
			||||||
| 
						 | 
					@ -2068,13 +2067,11 @@ view_destroy(struct view *view)
 | 
				
			||||||
		/* Application got killed while moving around */
 | 
							/* Application got killed while moving around */
 | 
				
			||||||
		server->input_mode = LAB_INPUT_STATE_PASSTHROUGH;
 | 
							server->input_mode = LAB_INPUT_STATE_PASSTHROUGH;
 | 
				
			||||||
		server->grabbed_view = NULL;
 | 
							server->grabbed_view = NULL;
 | 
				
			||||||
		need_cursor_update = true;
 | 
					 | 
				
			||||||
		regions_hide_overlay(&server->seat);
 | 
							regions_hide_overlay(&server->seat);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (server->active_view == view) {
 | 
						if (server->active_view == view) {
 | 
				
			||||||
		server->active_view = NULL;
 | 
							server->active_view = NULL;
 | 
				
			||||||
		need_cursor_update = true;
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (server->last_raised_view == view) {
 | 
						if (server->last_raised_view == view) {
 | 
				
			||||||
| 
						 | 
					@ -2130,7 +2127,5 @@ view_destroy(struct view *view)
 | 
				
			||||||
	wl_list_remove(&view->link);
 | 
						wl_list_remove(&view->link);
 | 
				
			||||||
	free(view);
 | 
						free(view);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (need_cursor_update) {
 | 
						cursor_update_focus(server);
 | 
				
			||||||
		cursor_update_focus(server);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue