kwin/src/wayland
Vlad Zahorodnii 152d7250a5 Pass a dedicated fd to each keyboard for the xkb keymap
Summary:
To better isolate the clients from each other eachh KeyboardInterface
creates it's own dedicated temporary file and sends the fd for this
temporary file to the client. This means the memory for the keymap is no
longer shared between all clients, every client has an own copy.

To support this the existing API to set the keymap is deprecated and
replaced by a new method setKeymapData which takes the content of the
keymap as a byte array. The now deprecated method which takes a file
descriptor is changed to use the new setKeymapData method. For that it
reads the content of the file.

The implementation in KeyboardInterface to create the file descriptor is
based on the implementation of KWin. As I implemented the change in KWin
(see 3b4c508ee3) it is not a problem from
GPL vs LGPL perspective.

The change includes test cases to verify that the content of the keymap
is properly passed to the client and that the memory is no longer shared.

BUG: 381674

Reviewers: #kwin, #frameworks, davidedmundson, zzag

Reviewed By: #kwin, zzag

Subscribers: plasma-devel, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D14910
2020-03-19 16:04:10 +02:00
..
autotests Pass a dedicated fd to each keyboard for the xkb keymap 2020-03-19 16:04:10 +02:00
cmake/Modules KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
server KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
tests KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
tools KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
.arcconfig Add .arcconfig 2016-01-25 10:53:57 +01:00
.arclint Add the arclint file in kwayland 2018-06-15 14:13:12 +05:30
appmenu_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
appmenu_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
blur_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
blur_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
clientconnection.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
clientconnection.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
CMakeLists.txt Pass a dedicated fd to each keyboard for the xkb keymap 2020-03-19 16:04:10 +02:00
compositor_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
compositor_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
config-kwayland.h.cmake Make linux/input.h compile time optional 2016-08-22 14:36:11 +02:00
contrast_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
contrast_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
COPYING.LIB Change to LGPLv2+ 2014-09-17 15:57:56 +02:00
datadevice_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
datadevice_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
datadevicemanager_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
datadevicemanager_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
dataoffer_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
dataoffer_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
datasource_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
datasource_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
display.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
display.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
dpms_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
dpms_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
dpms_interface_p.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
drm_fourcc.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
fakeinput_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
fakeinput_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
filtered_display.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
filtered_display.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
idle_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
idle_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
keyboard_interface.cpp Pass a dedicated fd to each keyboard for the xkb keymap 2020-03-19 16:04:10 +02:00
keyboard_interface.h Pass a dedicated fd to each keyboard for the xkb keymap 2020-03-19 16:04:10 +02:00
keyboard_interface_p.h Pass a dedicated fd to each keyboard for the xkb keymap 2020-03-19 16:04:10 +02:00
keystate_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
keystate_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
KF5WaylandConfig.cmake.in [FEATURE] Option to build & install QCH file with the public API dox 2017-06-05 03:03:25 +02:00
output_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
output_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
plasmashell_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
plasmashell_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
plasmavirtualdesktop_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
plasmavirtualdesktop_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
plasmawindowmanagement_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
plasmawindowmanagement_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
pointer_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
pointer_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
pointer_interface_p.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
region_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
seat_interface.cpp Pass a dedicated fd to each keyboard for the xkb keymap 2020-03-19 16:04:10 +02:00
seat_interface.h Pass a dedicated fd to each keyboard for the xkb keymap 2020-03-19 16:04:10 +02:00
seat_interface_p.h Pass a dedicated fd to each keyboard for the xkb keymap 2020-03-19 16:04:10 +02:00
server_decoration_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
server_decoration_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
server_decoration_palette_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
server_decoration_palette_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
shadow_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
shadow_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
slide_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
slide_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
subcompositor_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
subcompositor_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
subsurface_interface_p.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
surface_interface.cpp [server] Introduce SurfaceInterface::boundingRect() 2020-03-18 16:19:49 +02:00
surface_interface.h [server] Introduce SurfaceInterface::boundingRect() 2020-03-18 16:19:49 +02:00
surface_interface_p.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
surfacerole.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
surfacerole_p.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
touch_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
touch_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
xdgforeign_v2_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
xdgforeign_v2_interface_p.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
xdgshell_interface.cpp KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
xdgshell_interface.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00
xdgshell_interface_p.h KWayland: Convert license headers to SPDX 2020-03-16 19:57:44 +01:00