<table><tr><td style="">broulik created this revision.<br />broulik added a reviewer: Plasma.<br />broulik set the repository for this revision to rPOWERDEVIL Powerdevil.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: 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/D2033" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When we become the active session we already simulate user activity but we still get delivered any pending idle timeouts before even that causing us to send the computer to sleep when switching to an idle session.</p>
<p>BUG: 354250<br />
FIXED-IN: 5.7.0</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Separate changes include:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">m_pendingResumeFromIdleActions becomes a QSet so save the if (!contains) { append } dance</li>
<li class="remarkup-list-item">iterate over pendingResumeFromIdleActions and then clear the whole thing afterwards rather than erasing-while-iterating, might help Bug 345618</li>
<li class="remarkup-list-item">Using auto for iterator names</li>
</ul>
<p>Testing done:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Let my session idle, screen dimmed, moved mouse, screen brightened again</li>
<li class="remarkup-list-item">Switched to other session, waited for the timeout on the other session, switched back, screen did not dim (previously would do that and eventually suspend)</li>
<li class="remarkup-list-item">Switched to other session, waited for timeout, switched back, screen did not dim, did not touch the mouse during that, screen eventually dimmed as it should (but not immediately after switching)</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>rPOWERDEVIL Powerdevil</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2033" rel="noreferrer">https://phabricator.kde.org/D2033</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>daemon/powerdevilcore.cpp<br />
daemon/powerdevilcore.h<br />
daemon/powerdevilpolicyagent.cpp<br />
daemon/powerdevilpolicyagent.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>broulik, Plasma<br /><strong>Cc: </strong>plasma-devel, jensreuterberg, sebas<br /></div>