wayland: Use the wl_display_sync() request to track pending init roundtrips
Instead of maintaining the init refcount in regular event handlers that can fire in case of hotplug or mode changes, use a dedicated sync callback to wait for roundtrips.
This commit is contained in:
@ -1107,7 +1107,6 @@ 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)
|
||||
{
|
||||
@ -1186,12 +1185,6 @@ 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.
|
||||
*/
|
||||
if (display->init_ref_count > 0)
|
||||
display->init_ref_count--;
|
||||
}
|
||||
|
||||
static const struct wl_seat_listener seat_listener = {
|
||||
|
||||
Reference in New Issue
Block a user