mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	src/cursor.c: Fix branch condition for out-of-view selecting/dragging
Instead of using the stored view for comparison use the actual surface. Before this patch, there were situations where the branch intended for out-of-window text selection / scrollbar dragging was used even though the cursor never left the surface. Partly fixes #340
This commit is contained in:
		
							parent
							
								
									fbcdf38b52
								
							
						
					
					
						commit
						6dd290afc9
					
				
					 3 changed files with 27 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -91,16 +91,19 @@ struct seat {
 | 
			
		|||
	struct wlr_layer_surface_v1 *focused_layer;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * active_view will usually be NULL and is only set on button press
 | 
			
		||||
	 * while the mouse is over a view surface and reset to NULL on button
 | 
			
		||||
	 * release.
 | 
			
		||||
	 * pressed view/surface will usually be NULL and is only set on button
 | 
			
		||||
	 * press while the mouse is over a view surface and reset to NULL on
 | 
			
		||||
	 * button release.
 | 
			
		||||
	 * It is used to send cursor motion events to a surface even though
 | 
			
		||||
	 * the cursor has left the surface in the meantime.
 | 
			
		||||
	 *
 | 
			
		||||
	 * This allows to keep dragging a scrollbar or selecting text even
 | 
			
		||||
	 * when moving outside of the window.
 | 
			
		||||
	 */
 | 
			
		||||
	struct view *active_view;
 | 
			
		||||
	struct {
 | 
			
		||||
		struct view *view;
 | 
			
		||||
		struct wlr_surface *surface;
 | 
			
		||||
	} pressed;
 | 
			
		||||
 | 
			
		||||
	struct wl_client *active_client_while_inhibited;
 | 
			
		||||
	struct wl_list inputs;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue