mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	input/cursor: reset event source after unhide
Reset the event source after unhiding the cursor, to ensure that the timeout starts after showing the cursor. Also remove the open coded variant in seat_consider_warp_to_focus(). Fixes #5679
This commit is contained in:
		
							parent
							
								
									7ca9ef12f8
								
							
						
					
					
						commit
						afa890e8e9
					
				
					 2 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -299,6 +299,7 @@ void cursor_unhide(struct sway_cursor *cursor) {
 | 
				
			||||||
		cursor_set_image(cursor, image, cursor->image_client);
 | 
							cursor_set_image(cursor, image, cursor->image_client);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	cursor_rebase(cursor);
 | 
						cursor_rebase(cursor);
 | 
				
			||||||
 | 
						wl_event_source_timer_update(cursor->hide_source, cursor_get_timeout(cursor));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
 | 
					static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1482,7 +1482,6 @@ void seat_consider_warp_to_focus(struct sway_seat *seat) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (seat->cursor->hidden){
 | 
						if (seat->cursor->hidden){
 | 
				
			||||||
		cursor_unhide(seat->cursor);
 | 
							cursor_unhide(seat->cursor);
 | 
				
			||||||
		wl_event_source_timer_update(seat->cursor->hide_source, cursor_get_timeout(seat->cursor));
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue