[Differential] [Updated, 25 lines] D3950: Try to fix "Pinned Chrome disappears when all Chrome windows are closed"

hein (Eike Hein) noreply at phabricator.kde.org
Thu Jan 5 09:12:47 UTC 2017


hein updated this revision to Diff 9744.
hein added a comment.


  Eliminate reliance on QueuedConnection.
  
  In the previous version of the patch we still relied on QueuedConnection
  for the dataChanged invocation, because we were connecting to our own
  rowsRemoved. Proxy models emit rowsRemoved in response to their source
  model emitting aboutToBeRemoved (a row has to be removed from a proxy
  before it is removed from the source, otherwise things dangle). The
  dataChanged causes filterAcceptsRow to run, which checks the filterProxyModel
  for window/startup rows. With a direct connection it would still have the
  window, since it's just in "about to remove" stage, necessitating the
  QueuedConnection.
  
  Queueing things is Bad because it's hard to be sure what happens while the
  event loop spins. In this version of the patch we collect the indices in
  the source model's aboutToBeRemoved as previously, but then invoke
  dataChanged as the filterProxyModel (the one filterAcceptsRow checks) emits
  rowsRemoved. Now we can be sure filterAcceptsRow won't find the window in
  the filterProxyModel and will let the 'changed' launcher through, completing
  the lifecycle transition.
  
  This guarantees things happen synchronously without an event loop spin
  inbetween, which should also take care of the activity thing.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D3950?vs=9692&id=9744

BRANCH
  master

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

AFFECTED FILES
  libtaskmanager/tasksmodel.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: hein, davidedmundson, mart
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170105/fa8dc49a/attachment.html>


More information about the Plasma-devel mailing list