<table><tr><td style="">graesslin created this revision.<br />Restricted Application added a project: KWin.<br />Restricted Application added subscribers: kwin, plasma-devel.
</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/D5488" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>So far KWin started to filter out the escape key as soon as it gets<br />
pressed. This was done by unsetting keyboard focus. The idea was to<br />
reset keyboard focus when it is only a short press and that then the<br />
keyboard state is correct for the application. But in practice this<br />
does not work. The only application currently supporting pointer<br />
constraints (Xwayland) does not do anything on a key which is pressed<br />
when gaining keyboard focus. The result is escape not working in<br />
pointer constrained Xwayland windows.</p>

<p>This change addresses this problem by changing the interaction to only<br />
unset keyboard focus when our break constraints condition is met. This<br />
should also result in the application not handling the key release, but<br />
it means it gets the key press. Unfortunately I don't have a good way<br />
to test.</p>

<p>BUG: 378452</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>None</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>pointer-constraints-escape</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5488" rel="noreferrer">https://phabricator.kde.org/D5488</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/integration/pointer_constraints_test.cpp<br />
input.cpp</div></div></div><br /><div><strong>To: </strong>graesslin, KWin, Plasma<br /><strong>Cc: </strong>plasma-devel, kwin, spstarr, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol<br /></div>