summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-08-11 11:01:55 +0200
committerSimon Ser <contact@emersion.fr>2021-08-11 16:37:03 +0200
commitad0c1d4dbe8413d9094a92a3d346604ccc26c7a1 (patch)
tree1789ddf776670fc53249b92f7ade70f8df9dc130
parent00abaed89ae35d4c5c6b7e5b719bd27913684b79 (diff)
downloadgtk+-ad0c1d4dbe8413d9094a92a3d346604ccc26c7a1.tar.gz
gdk/wayland: add support for wl_seat version 7
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.
-rw-r--r--gdk/wayland/gdkdisplay-wayland.c2
-rw-r--r--gdk/wayland/gdkkeys-wayland.c2
-rw-r--r--meson.build2
3 files changed, 3 insertions, 3 deletions
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index f075a71c59..1860a73f78 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -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);
diff --git a/gdk/wayland/gdkkeys-wayland.c b/gdk/wayland/gdkkeys-wayland.c
index 38f346c75d..35ac9e8262 100644
--- a/gdk/wayland/gdkkeys-wayland.c
+++ b/gdk/wayland/gdkkeys-wayland.c
@@ -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);
diff --git a/meson.build b/meson.build
index f2aef2f646..484ce536c3 100644
--- a/meson.build
+++ b/meson.build
@@ -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'