<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/D5461" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>During pointer motion we already had the condition that an update of<br />
focused pointer surface can only happen when no button is pressed. But<br />
there are more conditions where we try to update the focused pointer even<br />
if a button is pressed. E.g. if the stacking order changes.</p>

<p>This happens when trying to move one of Qt's dock widgets:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Press inside a dock widget</li>
<li class="remarkup-list-item">Qt opens another window, which is underneath the cursor</li>
<li class="remarkup-list-item">KWin sends pointer leave to parent window</li>
<li class="remarkup-list-item">dock widget movement breaks</li>
</ol>

<p>This change ensures that also this sequence works as expected and the<br />
pointer gets only updated when there are no buttons pressed, no matter<br />
from where we go into the update code path.</p>

<p>BUG: 372876</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Dock widgets in Dolphin can be moved now.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>no-pointer-update-when-buttons-pressed</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5461" rel="noreferrer">https://phabricator.kde.org/D5461</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/integration/pointer_input.cpp<br />
input.cpp<br />
pointer_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>