xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Mar 3 08:46:31 UTC 2023
hw/xwayland/xwayland-input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d5dd3f3ceea30034e0bde1d11b460149c9373b93
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Thu Mar 2 10:12:25 2023 +0100
xwayland: Use MAP_PRIVATE for keymaps
With wl_pointer.axis_v120 support, the wl_seat supported version has
been bumped to 8, but Xwayland is still using MAP_SHARED which is
prohibited, wl_seat version 7 and above enforces the use of MAP_PRIVATE
for keymaps.
Use MAP_PRIVATE for the keymaps mmap().
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1512
Fixes: 3a02f56b4 - hook up wl_pointer.axis_v120 events
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 862544866..6e0600e4e 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -1110,7 +1110,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
munmap(xwl_seat->keymap, xwl_seat->keymap_size);
xwl_seat->keymap_size = size;
- xwl_seat->keymap = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
+ xwl_seat->keymap = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
if (xwl_seat->keymap == MAP_FAILED) {
xwl_seat->keymap_size = 0;
xwl_seat->keymap = NULL;
More information about the xorg-commit
mailing list