Commit fd106de6 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[scripting] Re-evaluate exclusions after switching between virtual desktops or activities

Summary:
OtherDesktopsExclusion and OtherActivitiesExclusion flags must be
re-evaluated after user has switched between virtual desktops or
activities; otherwise ClientLevel may contain clients that are not
necessarily on the current virtual desktop or activity.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T12877

Differential Revision: https://phabricator.kde.org/D28827
parent 4e739445
......@@ -39,6 +39,12 @@ static quint32 nextId() {
ClientLevel::ClientLevel(ClientModel *model, AbstractLevel *parent)
: AbstractLevel(model, parent)
{
#if KWIN_BUILD_ACTIVITIES
if (Activities *activities = Activities::self()) {
connect(activities, &Activities::currentChanged, this, &ClientLevel::reInit);
}
#endif
connect(VirtualDesktopManager::self(), &VirtualDesktopManager::currentChanged, this, &ClientLevel::reInit);
connect(Workspace::self(), &Workspace::clientAdded, this, &ClientLevel::clientAdded);
connect(Workspace::self(), &Workspace::clientRemoved, this, &ClientLevel::clientRemoved);
connect(model, SIGNAL(exclusionsChanged()), SLOT(reInit()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment