wayland: Roundtrip until we've receive initial input and output configuration
We use a ref-count mechanism to track whether parts of the init sequence still needs round trips to receive remaining initial state. Typically we need a couple of roundtrips total to get the global list, then the input and output configurations, but with the ref-count we avoid making global assumptions like that. https://bugzilla.gnome.org/show_bug.cgi?id=696340
This commit is contained in:
		| @ -1106,6 +1106,7 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, | ||||
|   GdkWaylandDeviceData *device = data; | ||||
|   GdkWaylandDeviceManager *device_manager = | ||||
|     GDK_WAYLAND_DEVICE_MANAGER(device->device_manager); | ||||
|   GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display); | ||||
|  | ||||
|   if ((caps & WL_SEAT_CAPABILITY_POINTER) && !device->wl_pointer) | ||||
|     { | ||||
| @ -1178,6 +1179,10 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, | ||||
|       _gdk_device_set_associated_device (device->pointer, device->keyboard); | ||||
|       _gdk_device_set_associated_device (device->keyboard, device->pointer); | ||||
|     } | ||||
|  | ||||
|   /* Once we have the capabilities event we know we have all events | ||||
|    * from the wl_seat and need no further init roundtrips. */ | ||||
|   display->init_ref_count--; | ||||
| } | ||||
|  | ||||
| static const struct wl_seat_listener seat_listener = { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Kristian Høgsberg
					Kristian Høgsberg