mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	s/desktop_view_at()/desktop_surface_and_view_at()/
Make is clearer what the function does.
This commit is contained in:
		
							parent
							
								
									23f28e5082
								
							
						
					
					
						commit
						1e4598cdce
					
				
					 3 changed files with 13 additions and 10 deletions
				
			
		
							
								
								
									
										14
									
								
								src/cursor.c
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								src/cursor.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -139,14 +139,15 @@ process_cursor_motion(struct server *server, uint32_t time)
 | 
			
		|||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* Otherwise, find the view under the pointer and send the event along */
 | 
			
		||||
	/* Otherwise, find view under the pointer and send the event along */
 | 
			
		||||
	double sx, sy;
 | 
			
		||||
	struct wlr_seat *wlr_seat = server->seat.seat;
 | 
			
		||||
	struct wlr_surface *surface = NULL;
 | 
			
		||||
	int view_area = LAB_SSD_NONE;
 | 
			
		||||
	struct view *view =
 | 
			
		||||
		desktop_view_at(server, server->seat.cursor->x,
 | 
			
		||||
			server->seat.cursor->y, &surface, &sx, &sy, &view_area);
 | 
			
		||||
	struct view *view = desktop_surface_and_view_at(server,
 | 
			
		||||
		server->seat.cursor->x, server->seat.cursor->y, &surface,
 | 
			
		||||
		&sx, &sy, &view_area);
 | 
			
		||||
 | 
			
		||||
	if (!view) {
 | 
			
		||||
		set_cursor(server, XCURSOR_DEFAULT);
 | 
			
		||||
	} else {
 | 
			
		||||
| 
						 | 
				
			
			@ -296,8 +297,9 @@ cursor_button(struct wl_listener *listener, void *data)
 | 
			
		|||
	int view_area = LAB_SSD_NONE;
 | 
			
		||||
	uint32_t resize_edges;
 | 
			
		||||
 | 
			
		||||
	struct view *view = desktop_view_at(server, server->seat.cursor->x,
 | 
			
		||||
		server->seat.cursor->y, &surface, &sx, &sy, &view_area);
 | 
			
		||||
	struct view *view = desktop_surface_and_view_at(server,
 | 
			
		||||
		server->seat.cursor->x, server->seat.cursor->y, &surface,
 | 
			
		||||
		&sx, &sy, &view_area);
 | 
			
		||||
 | 
			
		||||
	/* handle alt + _press_ on view */
 | 
			
		||||
	struct wlr_input_device *device = seat->keyboard_group->input_device;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -297,7 +297,7 @@ wlr_surface *layer_surface_at(struct wl_list *layer, double lx, double ly,
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
struct view *
 | 
			
		||||
desktop_view_at(struct server *server, double lx, double ly,
 | 
			
		||||
desktop_surface_and_view_at(struct server *server, double lx, double ly,
 | 
			
		||||
		struct wlr_surface **surface, double *sx, double *sy,
 | 
			
		||||
		int *view_area)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue