<pre style="font-family: &#39;Times New Roman&#39;; font-size: medium; word-wrap: break-word; white-space: pre-wrap; ">Hi. This is a patch for gtk to build against current wayland:</pre><pre style="word-wrap: break-word; ">
<font class="Apple-style-span" size="3"><span class="Apple-style-span" style="white-space: pre-wrap;">diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c
index e93abc8..21b3bf5 100644
--- a/gdk/wayland/gdkcursor-wayland.c
+++ b/gdk/wayland/gdkcursor-wayland.c
@@ -224,7 +224,7 @@ create_cursor(GdkDisplayWayland *display, GdkPixbuf *pixbuf, int x, int y)
   else
     memset (cursor-&gt;map, 0, 4);
 
-  visual = wl_display_get_premultiplied_argb_visual(display-&gt;wl_display);
+  visual = display-&gt;premultiplied_argb_visual;
   cursor-&gt;buffer = wl_shm_create_buffer(display-&gt;shm,
                                         fd,
                                         cursor-&gt;width,
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 5cd7be2..8481e8b 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -124,17 +124,53 @@ static const struct wl_shell_listener shell_listener = {
 
 static void
 output_handle_geometry(void *data,
-                       struct wl_output *output,
-                       int32_t x, int32_t y, int32_t width, int32_t height)
+                       struct wl_output *wl_output,
+                       int x, int y, int physical_width, int physical_height,
+                       int subpixel, const char *make, const char *model)
 {
   /*
     g_signal_emit_by_name (screen, &quot;monitors-changed&quot;);
     g_signal_emit_by_name (screen, &quot;size-changed&quot;);
   */
 }
+static void
+display_handle_mode(void *data,
+                   struct wl_output *wl_output,
+                   uint32_t flags,
+                   int width,
+                   int height,
+                   int refresh)
+{
+}
+
+static void
+compositor_handle_visual(void *data,
+                         struct wl_compositor *compositor,
+                         uint32_t id, uint32_t token)
+{
+        GdkDisplayWayland *d = data;
+
+        switch (token) {
+        case WL_COMPOSITOR_VISUAL_ARGB32:
+                d-&gt;argb_visual = wl_visual_create(d-&gt;wl_display, id, 1);
+                break;
+        case WL_COMPOSITOR_VISUAL_PREMULTIPLIED_ARGB32:
+                d-&gt;premultiplied_argb_visual =
+                        wl_visual_create(d-&gt;wl_display, id, 1);
+                break;
+        case WL_COMPOSITOR_VISUAL_XRGB32:
+                d-&gt;rgb_visual = wl_visual_create(d-&gt;wl_display, id, 1);
+                break;
+        }
+}
+
+static const struct wl_compositor_listener compositor_listener = {
+        compositor_handle_visual,
+};
 
 static const struct wl_output_listener output_listener = {
         output_handle_geometry,
+        display_handle_mode
 };
 
 static void
@@ -147,6 +183,8 @@ gdk_display_handle_global(struct wl_display *display, uint32_t id,
 
   if (strcmp(interface, &quot;wl_compositor&quot;) == 0) {
     display_wayland-&gt;compositor = wl_compositor_create(display, id, 1);
+    wl_compositor_add_listener(display_wayland-&gt;compositor,
+                                           &amp;compositor_listener, display_wayland);
   } else if (strcmp(interface, &quot;wl_shm&quot;) == 0) {
     display_wayland-&gt;shm = wl_shm_create(display, id, 1);
   } else if (strcmp(interface, &quot;wl_shell&quot;) == 0) {
diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h
index 88756af..787de8c 100644
--- a/gdk/wayland/gdkdisplay-wayland.h
+++ b/gdk/wayland/gdkdisplay-wayland.h
@@ -71,6 +71,7 @@ struct _GdkDisplayWayland
 
   /* Wayland fields below */
   struct wl_display *wl_display;
+  struct wl_visual *argb_visual, *premultiplied_argb_visual, *rgb_visual;
   struct wl_compositor *compositor;
   struct wl_shm *shm;
   struct wl_shell *shell;
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index b1cb479..26f426d 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -482,15 +482,14 @@ _gdk_wayland_screen_new (GdkDisplay *display)
   screen_wayland-&gt;width = 8192;
   screen_wayland-&gt;height = 8192;
 
-  visual = wl_display_get_argb_visual(display_wayland-&gt;wl_display);
+  visual = display_wayland-&gt;argb_visual;
   screen_wayland-&gt;argb_visual = gdk_wayland_visual_new (screen, visual);
 
-  visual =
-    wl_display_get_premultiplied_argb_visual(display_wayland-&gt;wl_display);
+  visual = display_wayland-&gt;premultiplied_argb_visual;
   screen_wayland-&gt;premultiplied_argb_visual =
     gdk_wayland_visual_new (screen, visual);
 
-  visual = wl_display_get_rgb_visual(display_wayland-&gt;wl_display);
+  visual = display_wayland-&gt;rgb_visual;
   screen_wayland-&gt;rgb_visual = gdk_wayland_visual_new (screen, visual);
 
   screen_wayland-&gt;root_window =
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index c19b3c5..194d763 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -392,7 +392,7 @@ gdk_wayland_create_cairo_surface (GdkDisplayWayland *display,
   data = g_new (GdkWaylandCairoSurfaceData, 1);
   data-&gt;display = display;
   data-&gt;buffer = NULL;
-  visual = wl_display_get_premultiplied_argb_visual(display-&gt;wl_display);
+  visual = display-&gt;premultiplied_argb_visual;
   data-&gt;width = width;
   data-&gt;height = height;
   data-&gt;pixmap = wl_egl_pixmap_create(width, height, visual, 0);
@@ -450,6 +450,8 @@ gdk_wayland_window_map (GdkWindow *window)
 {
   GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window-&gt;impl);
   GdkWindowImplWayland *parent;
+  GdkDisplayWayland *display_wayland =
+                GDK_DISPLAY_WAYLAND (gdk_window_get_display (impl-&gt;wrapper));
 
   if (!impl-&gt;mapped)
     {
@@ -462,11 +464,11 @@ gdk_wayland_window_map (GdkWindow *window)
                   window-&gt;y);
 
           parent = GDK_WINDOW_IMPL_WAYLAND (impl-&gt;transient_for-&gt;impl);
-          wl_surface_map_transient (impl-&gt;surface, parent-&gt;surface,
+          wl_shell_set_transient (display_wayland-&gt;shell, impl-&gt;surface, parent-&gt;surface,
                                     window-&gt;x, window-&gt;y, 0);
         }
       else
-        wl_surface_map_toplevel (impl-&gt;surface);
+      wl_shell_set_toplevel (display_wayland-&gt;shell, impl-&gt;surface);
       impl-&gt;mapped = TRUE;
     }
 }</span></font><span class="Apple-style-span" style="font-family: &#39;Times New Roman&#39;; white-space: pre-wrap; font-size: medium; ">
</span></pre><div style="font-family: &#39;Times New Roman&#39;; font-size: medium; "><br></div><pre style="font-family: &#39;Times New Roman&#39;; font-size: medium; word-wrap: break-word; white-space: pre-wrap; "><br></pre>