<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: KWin, Frameworks, davidedmundson.<br />Herald added a project: Frameworks.<br />Herald added a subscriber: kde-frameworks-devel.<br />graesslin requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14910">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>To better isolate the clients from each other eachh KeyboardInterface<br />
creates it's own dedicated temporary file and sends the fd for this<br />
temporary file to the client. This means the memory for the keymap is no<br />
longer shared between all clients, every client has an own copy.</p>

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

<p>The implementation in KeyboardInterface to create the file descriptor is<br />
based on the implementation of KWin. As I implemented the change in KWin<br />
(see <a href="https://phabricator.kde.org/R108:3b4c508ee36ac74c37e77fcaa14d106397ad2994" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">3b4c508ee36ac74c37e77fcaa14d106397ad2994</a>) it is not a problem from<br />
GPL vs LGPL perspective.</p>

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

<p>BUG: 381674</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R127 KWayland</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14910">https://phabricator.kde.org/D14910</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/client/test_wayland_seat.cpp<br />
src/server/keyboard_interface.cpp<br />
src/server/keyboard_interface.h<br />
src/server/keyboard_interface_p.h<br />
src/server/seat_interface.cpp<br />
src/server/seat_interface.h<br />
src/server/seat_interface_p.h</div></div></div><br /><div><strong>To: </strong>graesslin, KWin, Frameworks, davidedmundson<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>