<table><tr><td style="">broulik created this revision.<br />broulik added a reviewer: Plasma.<br />Herald added a project: Frameworks.<br />Herald added a subscriber: kde-frameworks-devel.<br />broulik 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/D20805">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Just because the item is <tt style="background: #ebebeb; font-size: 13px;">visible</tt> doesn't mean the window itself is. Keep track of the window it's in.<br />
Use <tt style="background: #ebebeb; font-size: 13px;">itemChange</tt> instead of connects and move the check for starting to <tt style="background: #ebebeb; font-size: 13px;">startRedirect</tt> so we don't have to check the conditions for that in every change handler (visible && enabled && window->visible). It also saves three connects in the constructor.<br />
Also, don't unredirect if we didn't redirect in the first place to avoid warnings printed on console.</p>
<p>BUG: 406303</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Window thumbnails still work<br />
Don't have fds pile up anymore</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D20805">https://phabricator.kde.org/D20805</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/declarativeimports/core/windowthumbnail.cpp<br />
src/declarativeimports/core/windowthumbnail.h</div></div></div><br /><div><strong>To: </strong>broulik, Plasma<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>