[gtk+/gtk-3-16] wayland: Wait for output and seat information
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] wayland: Wait for output and seat information
- Date: Thu, 9 Apr 2015 10:01:49 +0000 (UTC)
commit ed36e29ec466d21f453efcb9b9bdf740ff5f082d
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 9 00:14:20 2015 -0400
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
gdk/wayland/gdkdisplay-wayland.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 1b26e5b..1d17cd7 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -193,11 +193,13 @@ gdk_registry_handle_global (void *data,
output =
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));
+ wl_display_roundtrip (display_wayland->wl_display);
}
else if (strcmp (interface, "wl_seat") == 0)
{
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);
+ wl_display_roundtrip (display_wayland->wl_display);
}
else if (strcmp (interface, "wl_data_device_manager") == 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]