diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2023-03-02 10:12:25 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@gmail.com> | 2023-03-03 08:44:04 +0000 |
commit | d5dd3f3ceea30034e0bde1d11b460149c9373b93 (patch) | |
tree | b520ac6da5e56f4103903847c0e956fe5ed2ceed | |
parent | c6f2598a4e62ea6c0d5244faf1488b20985df908 (diff) | |
download | xserver-d5dd3f3ceea30034e0bde1d11b460149c9373b93.tar.gz |
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@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1512
Fixes: 3a02f56b4 - hook up wl_pointer.axis_v120 events
-rw-r--r-- | hw/xwayland/xwayland-input.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |