[Wayland-bugs] [Bug 704104] gdk/wayland: cope with the compositor implementing an older protocol than us

gtk+ (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jul 12 09:31:09 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=704104
  gtk+ | wayland | unspecified

--- Comment #2 from Emmanuele Bassi (:ebassi) <ebassi at gmail.com> 2013-07-12 16:31:03 UTC ---
Review of attachment 249018:
 --> (https://bugzilla.gnome.org/review?bug=704104&attachment=249018)

if we make requests that appeared in a later version I assume we'll have
fallbacks in place.

as a side note: at some point, we'll have to fix the coding style of this whole
backend to fit in with the GDK coding style.

::: gdk/wayland/gdkdisplay-wayland.c
@@ +170,3 @@
   } else if (strcmp(interface, "wl_output") == 0) {
     output =
+      wl_registry_bind(display_wayland->wl_registry, id, &wl_output_interface,
MIN (version, 2));

we're not using it, right now, but should we save the output version as well,
for later use?

::: gdk/wayland/gdkwindow-wayland.c
@@ +587,3 @@
   wl_surface_attach (impl->surface, data->buffer, dx, dy);
+  if (GDK_WAYLAND_DISPLAY (gdk_window_get_display
(window))->compositor_version >=
+      WL_SURFACE_HAS_BUFFER_SCALE)

don't break the condition; if the line feels too long, take out the cast from
GdkDisplay to GdkWaylandDisplay into a separate assignment.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Wayland-bugs mailing list