mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	Drop dummy wl_grab_surface hack
This commit is contained in:
		
							parent
							
								
									855ab75787
								
							
						
					
					
						commit
						4be2ed9611
					
				
					 4 changed files with 3 additions and 29 deletions
				
			
		| 
						 | 
				
			
			@ -516,7 +516,6 @@ wlsc_input_device_start_grab(struct wlsc_input_device *device,
 | 
			
		|||
		(struct wlsc_surface *) device->input_device.pointer_focus;
 | 
			
		||||
 | 
			
		||||
	device->grab = grab;
 | 
			
		||||
	device->grab_surface = focus;
 | 
			
		||||
	device->grab_button = button;
 | 
			
		||||
	device->grab_time = time;
 | 
			
		||||
	device->grab_x = device->x;
 | 
			
		||||
| 
						 | 
				
			
			@ -542,8 +541,6 @@ wlsc_input_device_update_grab(struct wlsc_input_device *device,
 | 
			
		|||
		return -1;
 | 
			
		||||
 | 
			
		||||
	device->grab = grab;
 | 
			
		||||
	wl_input_device_set_pointer_focus(&device->input_device,
 | 
			
		||||
					  &wl_grab_surface, time, 0, 0, 0, 0);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -769,7 +766,7 @@ notify_motion(struct wlsc_input_device *device, uint32_t time, int x, int y)
 | 
			
		|||
		break;
 | 
			
		||||
 | 
			
		||||
	case WLSC_DEVICE_GRAB_MOVE:
 | 
			
		||||
		es = device->grab_surface;
 | 
			
		||||
		es = (struct wlsc_surface *) device->input_device.pointer_focus;
 | 
			
		||||
		es->x = x + device->grab_dx;
 | 
			
		||||
		es->y = y + device->grab_dy;;
 | 
			
		||||
		wl_client_post_event(es->surface.client,
 | 
			
		||||
| 
						 | 
				
			
			@ -792,8 +789,7 @@ notify_motion(struct wlsc_input_device *device, uint32_t time, int x, int y)
 | 
			
		|||
	case WLSC_DEVICE_GRAB_RESIZE_TOP_RIGHT:
 | 
			
		||||
	case WLSC_DEVICE_GRAB_RESIZE_BOTTOM_RIGHT:
 | 
			
		||||
	case WLSC_DEVICE_GRAB_RESIZE_MASK:
 | 
			
		||||
		es = device->grab_surface;
 | 
			
		||||
 | 
			
		||||
		es = (struct wlsc_surface *) device->input_device.pointer_focus;
 | 
			
		||||
		if (device->grab & WLSC_DEVICE_GRAB_RESIZE_LEFT) {
 | 
			
		||||
			sx = x + device->grab_dx;
 | 
			
		||||
			width = device->grab_x - x + device->grab_width;
 | 
			
		||||
| 
						 | 
				
			
			@ -993,9 +989,7 @@ input_device_attach(struct wl_client *client,
 | 
			
		|||
	if (device->input_device.pointer_focus == NULL)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if (device->input_device.pointer_focus->client != client &&
 | 
			
		||||
	    !(device->input_device.pointer_focus == &wl_grab_surface &&
 | 
			
		||||
	      device->grab_surface->surface.client == client))
 | 
			
		||||
	if (device->input_device.pointer_focus->client != client)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if (buffer == NULL) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,7 +92,6 @@ struct wlsc_input_device {
 | 
			
		|||
	uint32_t modifier_state;
 | 
			
		||||
 | 
			
		||||
	enum wlsc_grab_type grab;
 | 
			
		||||
	struct wlsc_surface *grab_surface;
 | 
			
		||||
	uint32_t grab_time;
 | 
			
		||||
	int32_t grab_x, grab_y;
 | 
			
		||||
	int32_t grab_width, grab_height;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,15 +80,6 @@ struct wl_global {
 | 
			
		|||
	struct wl_list link;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
WL_EXPORT struct wl_surface wl_grab_surface = {
 | 
			
		||||
	{},
 | 
			
		||||
	NULL,
 | 
			
		||||
	{
 | 
			
		||||
		&wl_grab_surface.destroy_listener_list,
 | 
			
		||||
		&wl_grab_surface.destroy_listener_list
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static int wl_debug = 0;
 | 
			
		||||
 | 
			
		||||
WL_EXPORT void
 | 
			
		||||
| 
						 | 
				
			
			@ -98,10 +89,6 @@ wl_client_post_event(struct wl_client *client, struct wl_object *sender,
 | 
			
		|||
	struct wl_closure *closure;
 | 
			
		||||
	va_list ap;
 | 
			
		||||
 | 
			
		||||
	if (client == NULL)
 | 
			
		||||
		/* wl_grab_surface case */
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	va_start(ap, opcode);
 | 
			
		||||
	closure = wl_connection_vmarshal(client->connection,
 | 
			
		||||
					 sender, opcode, ap,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,12 +36,6 @@ enum {
 | 
			
		|||
	WL_EVENT_WRITEABLE = 0x02
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* FIXME: We really want in-process objects here, so that the
 | 
			
		||||
 * compositor grabs can be implemented as passive grabs and the events
 | 
			
		||||
 * be delivered to an in-process listener.  For now, we use this
 | 
			
		||||
 * special case as the grabbing surface. */
 | 
			
		||||
extern struct wl_surface wl_grab_surface;
 | 
			
		||||
 | 
			
		||||
struct wl_event_loop;
 | 
			
		||||
struct wl_event_source;
 | 
			
		||||
typedef void (*wl_event_loop_fd_func_t)(int fd, uint32_t mask, void *data);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue