wayland: Wait for output and seat information
When we open the connection, we get the wl_output object, but we return before all the information such as monitor geometry has arrived, which causes us to misinform early users of this information. Do a roundtrip here that causes us to wait until the information is complete. Do the same for seats, just in case. https://bugzilla.gnome.org/show_bug.cgi?id=747471
This commit is contained in:
@ -193,11 +193,13 @@ gdk_registry_handle_global (void *data,
|
|||||||
output =
|
output =
|
||||||
wl_registry_bind (display_wayland->wl_registry, id, &wl_output_interface, MIN (version, 2));
|
wl_registry_bind (display_wayland->wl_registry, id, &wl_output_interface, MIN (version, 2));
|
||||||
_gdk_wayland_screen_add_output (display_wayland->screen, id, output, MIN (version, 2));
|
_gdk_wayland_screen_add_output (display_wayland->screen, id, output, MIN (version, 2));
|
||||||
|
wl_display_roundtrip (display_wayland->wl_display);
|
||||||
}
|
}
|
||||||
else if (strcmp (interface, "wl_seat") == 0)
|
else if (strcmp (interface, "wl_seat") == 0)
|
||||||
{
|
{
|
||||||
seat = wl_registry_bind (display_wayland->wl_registry, id, &wl_seat_interface, MIN (version, 4));
|
seat = wl_registry_bind (display_wayland->wl_registry, id, &wl_seat_interface, MIN (version, 4));
|
||||||
_gdk_wayland_device_manager_add_seat (gdk_display->device_manager, id, seat);
|
_gdk_wayland_device_manager_add_seat (gdk_display->device_manager, id, seat);
|
||||||
|
wl_display_roundtrip (display_wayland->wl_display);
|
||||||
}
|
}
|
||||||
else if (strcmp (interface, "wl_data_device_manager") == 0)
|
else if (strcmp (interface, "wl_data_device_manager") == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user