From 60fb809a7954240e63a9df82eadc2d6325945d4e Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 7 Sep 2021 11:28:19 +0100 Subject: [PATCH] Client: map keyboard mapping privately We are never going to write back changes into the compositor's keymap, so there is no reason to have support for writing back to the compositor. V7 of the spec says: "From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail." Whilst we don't support v7 yet it is harmless to change this early. Task-number: QTBUG-96259 Change-Id: I16afcae4aa89ff24955981e714096359d0a54792 Reviewed-by: Qt CI Bot Reviewed-by: Allan Sandfeld Jensen --- src/plugins/platforms/wayland/qwaylandinputdevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index 46b84f4570b..78e75d7b139 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -1165,7 +1165,7 @@ void QWaylandInputDevice::Keyboard::keyboard_keymap(uint32_t format, int32_t fd, return; } - char *map_str = static_cast(mmap(nullptr, size, PROT_READ, MAP_SHARED, fd, 0)); + char *map_str = static_cast(mmap(nullptr, size, PROT_READ, MAP_PRIVATE, fd, 0)); if (map_str == MAP_FAILED) { close(fd); return;