<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: Plasma on Wayland, KWin.<br />Restricted Application added subscribers: kwin, plasma-devel.<br />Restricted Application added projects: Plasma on Wayland, KWin.
</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/D2786" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This change makes use of the internal key state in better way. If a<br />
key is not considered pressed, no key release is sent. This can happen<br />
for example if the compositor grabs a key press (global shortcut) but not<br />
the release. The Wayland client cannot do anything with the release as it<br />
never got the press. Thus it doesn't make sense to send the release.</p>

<p>Similar if a key is already pressed, it doesn't make sense to send<br />
another press event. This ensures that if the server sends in repeating<br />
key presses they are filtered out. Key repeat is handled on client side.<br />
Also if several physical keys send the same key code, pressing them at<br />
the same time won't send double press/release event.</p>

<p>This change might cause regressions in KWin in case KWin does not handle<br />
the situation correctly. But that would be a bug in KWin which needs to<br />
be fixed there. If it causes regressions the bug might have shown in<br />
other situations as well.</p>

<p>BUG: 366625<br />
FIXED-IN: 5.27</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKWAYLAND KWayland</div></div></div><br /><div><strong>BRANCH</strong><div><div>update-key-only-on-change</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2786" rel="noreferrer">https://phabricator.kde.org/D2786</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/client/test_wayland_seat.cpp<br />
src/server/seat_interface.cpp<br />
src/server/seat_interface_p.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>graesslin, Plasma on Wayland, KWin<br /><strong>Cc: </strong>plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas<br /></div>