gdk/wayland: add support for wl_seat version 7
authorSimon Ser <contact@emersion.fr>
Wed, 11 Aug 2021 09:01:55 +0000 (11:01 +0200)
committerSimon Ser <contact@emersion.fr>
Wed, 11 Aug 2021 14:37:03 +0000 (16:37 +0200)
Version 7 requires wl_keyboard keymaps to be mapped with
MAP_PRIVATE, so that the compositor can share the same keymap
file between multiple clients.

gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkkeys-wayland.c
meson.build

index f075a71c5927b29acfec7beeac9ad04351d8b756..1860a73f782e9599d9247e74089d070a2f2463d1 100644 (file)
@@ -240,7 +240,7 @@ _gdk_wayland_display_add_seat (GdkWaylandDisplay *display_wayland,
 {
   struct wl_seat *seat;
 
-  display_wayland->seat_version = MIN (version, 6);
+  display_wayland->seat_version = MIN (version, 7);
   seat = wl_registry_bind (display_wayland->wl_registry,
                            id, &wl_seat_interface,
                            display_wayland->seat_version);
index 38f346c75df150b27f590b4477651fffdeb3869b..35ac9e8262ffb945cf5cbd25297cb620e636729a 100644 (file)
@@ -542,7 +542,7 @@ _gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
 
   context = xkb_context_new (0);
 
-  map_str = mmap (NULL, size, PROT_READ, MAP_SHARED, fd, 0);
+  map_str = mmap (NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
   if (map_str == MAP_FAILED)
     {
       close(fd);
index f2aef2f646c3d70f09151d962f8b2dba7b353ee8..484ce536c33455839d9d8139d4dc83db6d616cd8 100644 (file)
@@ -17,7 +17,7 @@ cairo_req          = '>= 1.14.0'
 gdk_pixbuf_req     = '>= 2.30.0'
 introspection_req  = '>= 1.39.0'
 wayland_proto_req  = '>= 1.21'
-wayland_req        = '>= 1.14.91'
+wayland_req        = '>= 1.16.91'
 graphene_req       = '>= 1.9.1'
 epoxy_req          = '>= 1.4'
 cloudproviders_req = '>= 0.3.1'