mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Don't send pointer motion when rebasing the cursor
This commit is contained in:
		
							parent
							
								
									866a19b743
								
							
						
					
					
						commit
						5b454ac441
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -193,11 +193,9 @@ static void cursor_do_rebase(struct sway_cursor *cursor, uint32_t time_msec,
 | 
				
			||||||
		struct sway_node *node, struct wlr_surface *surface,
 | 
							struct sway_node *node, struct wlr_surface *surface,
 | 
				
			||||||
		double sx, double sy) {
 | 
							double sx, double sy) {
 | 
				
			||||||
	struct wlr_seat *wlr_seat = cursor->seat->wlr_seat;
 | 
						struct wlr_seat *wlr_seat = cursor->seat->wlr_seat;
 | 
				
			||||||
	// Handle cursor image
 | 
					 | 
				
			||||||
	if (surface) {
 | 
						if (surface) {
 | 
				
			||||||
		if (seat_is_input_allowed(cursor->seat, surface)) {
 | 
							if (seat_is_input_allowed(cursor->seat, surface)) {
 | 
				
			||||||
			wlr_seat_pointer_notify_enter(wlr_seat, surface, sx, sy);
 | 
								wlr_seat_pointer_notify_enter(wlr_seat, surface, sx, sy);
 | 
				
			||||||
			wlr_seat_pointer_notify_motion(wlr_seat, time_msec, sx, sy);
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else if (node && node->type == N_CONTAINER) {
 | 
						} else if (node && node->type == N_CONTAINER) {
 | 
				
			||||||
		// Try a node's resize edge
 | 
							// Try a node's resize edge
 | 
				
			||||||
| 
						 | 
					@ -462,6 +460,9 @@ static void handle_motion(struct sway_seat *seat, uint32_t time_msec,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cursor_do_rebase(cursor, time_msec, node, surface, sx, sy);
 | 
						cursor_do_rebase(cursor, time_msec, node, surface, sx, sy);
 | 
				
			||||||
 | 
						if (surface && seat_is_input_allowed(cursor->seat, surface)) {
 | 
				
			||||||
 | 
							wlr_seat_pointer_notify_motion(wlr_seat, time_msec, sx, sy);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct sway_drag_icon *drag_icon;
 | 
						struct sway_drag_icon *drag_icon;
 | 
				
			||||||
	wl_list_for_each(drag_icon, &root->drag_icons, link) {
 | 
						wl_list_for_each(drag_icon, &root->drag_icons, link) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue