D17069: [x11] Emit clientRemoved after client was removed
Vlad Zagorodniy <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.
REVISION SUMMARY
Currently, there is a guarantee that a client, which is about to be removed,
is no longer in the stacking order(both in constrained and unconstrained)
when Workspace::removeClient is called. However, because the client gets
removed from m_allClients after clientRemoved is emitted, it can be
re-inserted back into the stacking order.
In general, the pattern is to do some work and then notify others about
what you've done by emitting a signal. In the case of Workspace::removeClient,
we emit clientRemoved way before the client actually gets removed.
CCBUG: 392412
CCBUG: 400854
TEST PLAN
- Enable the following script:
workspace.clientAdded.connect(function (client) { if (client.skipTaskbar || client.modal || client.transient) { return; } workspace.desktops = workspace.desktops + 1; workspace.currentDesktop = workspace.desktops; client.desktop = workspace.currentDesktop; });
workspace.clientRemoved.connect(function (client) { if (client.skipTaskbar || client.modal || client.transient) { return; } workspace.desktops = workspace.desktops - 1; });
- Open an app, close the app.
REPOSITORY
R108 KWin
BRANCH
workspace-emit-clientremoved-after-it-was-actually-removed
REVISION DETAIL
https://phabricator.kde.org/D17069
AFFECTED FILES
workspace.cpp
To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart