mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	src/cursor.c: fix invisible cursor on output loss / restore
Previously, the cursor image was only updated on output loss when the
cursor was on a labwc owned surface. This patch forces a re-enter of a
client surface in the remaining case of cursor being over a non-labwc
surface which causes the client to re-set its own cursor image.
This fixes a regression caused by 4dc99e2f38.
Thanks to @Flrian for finding the root cause of the issue.
Fixes #820
Reported-by: @Flrian
Tested-by: @Flrian
			
			
This commit is contained in:
		
							parent
							
								
									a8e0248f47
								
							
						
					
					
						commit
						4cd8afa83e
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		
							
								
								
									
										10
									
								
								src/cursor.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/cursor.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -260,6 +260,16 @@ cursor_update_image(struct seat *seat)
 | 
			
		|||
{
 | 
			
		||||
	enum lab_cursors cursor = seat->server_cursor;
 | 
			
		||||
	if (cursor == LAB_CURSOR_CLIENT) {
 | 
			
		||||
		/*
 | 
			
		||||
		 * When we loose the output cursor while over a client
 | 
			
		||||
		 * surface (e.g. output was destroyed and we now deal with
 | 
			
		||||
		 * a new output instance), we have to force a re-enter of
 | 
			
		||||
		 * the surface so the client sets its own cursor again.
 | 
			
		||||
		 */
 | 
			
		||||
		if (seat->seat->pointer_state.focused_surface) {
 | 
			
		||||
			seat->server_cursor = LAB_CURSOR_DEFAULT;
 | 
			
		||||
			cursor_update_focus(seat->server);
 | 
			
		||||
		}
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	wlr_xcursor_manager_set_cursor_image(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue