build: Don't require bleeding-edge wayland-protocols
authorMatthias Clasen <mclasen@redhat.com>
Sun, 30 Jul 2023 08:08:11 +0000 (11:08 +0300)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 30 Jul 2023 08:40:09 +0000 (11:40 +0300)
The 1.32 wayland-protocols release is not in distribution
builds yet, so a hard dependency on it is not helpful.

gdk/wayland/gdktoplevel-wayland.c
meson.build

index e463b976865563e848463815bbe649fd5bfeec57..9dbab516ab2af00bdb5a56662411fa64baec3f2b 100644 (file)
@@ -620,9 +620,11 @@ xdg_toplevel_configure (void                *data,
           pending_state |= (GDK_TOPLEVEL_STATE_TILED |
                             GDK_TOPLEVEL_STATE_LEFT_TILED);
           break;
+#ifdef HAVE_TOPLEVEL_STATE_SUSPENDED
         case XDG_TOPLEVEL_STATE_SUSPENDED:
           pending_state |= GDK_TOPLEVEL_STATE_SUSPENDED;
           break;
+#endif
         default:
           /* Unknown state */
           break;
index 17681d1359c8c72ed7d547d7ea8c5e5a8a00d90d..b99bf847b3ed3a49ec65f6bd0b40c99f2c378377 100644 (file)
@@ -18,7 +18,7 @@ harfbuzz_req       = '>= 2.6.0'
 fribidi_req        = '>= 1.0.6'
 cairo_req          = '>= 1.14.0'
 gdk_pixbuf_req     = '>= 2.30.0'
-wayland_proto_req  = '>= 1.32'
+wayland_proto_req  = '>= 1.31'
 wayland_req        = '>= 1.21.0'
 graphene_req       = '>= 1.10.0'
 epoxy_req          = '>= 1.4'
@@ -483,6 +483,10 @@ if wayland_enabled
     'xkbcommon @0@'.format(xkbcommon_req),
     'wayland-egl',
   ]
+
+  if wlprotocolsdep.version().version_compare('>=1.32')
+    cdata.set('HAVE_TOPLEVEL_STATE_SUSPENDED', 1)
+  endif
 endif
 
 x11_pkgs = []