broulik created this revision.
broulik added a reviewer: Plasma.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
broulik requested review of this revision.

REVISION SUMMARY
  Just because the item is `visible` doesn't mean the window itself is. Keep 
track of the window it's in.
  Use `itemChange` instead of connects and move the check for starting to 
`startRedirect` 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.
  Also, don't unredirect if we didn't redirect in the first place to avoid 
warnings printed on console.
  
  BUG: 406303

TEST PLAN
  Window thumbnails still work
  Don't have fds pile up anymore

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D20805

AFFECTED FILES
  src/declarativeimports/core/windowthumbnail.cpp
  src/declarativeimports/core/windowthumbnail.h

To: broulik, #plasma
Cc: kde-frameworks-devel, michaelh, ngraham, bruns

Reply via email to