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

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

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:
parent 4e739445
...@@ -39,6 +39,12 @@ static quint32 nextId() { ...@@ -39,6 +39,12 @@ static quint32 nextId() {
ClientLevel::ClientLevel(ClientModel *model, AbstractLevel *parent) ClientLevel::ClientLevel(ClientModel *model, AbstractLevel *parent)
: AbstractLevel(model, parent) : AbstractLevel(model, parent)
{ {
if (Activities *activities = Activities::self()) {
connect(activities, &Activities::currentChanged, this, &ClientLevel::reInit);
connect(VirtualDesktopManager::self(), &VirtualDesktopManager::currentChanged, this, &ClientLevel::reInit);
connect(Workspace::self(), &Workspace::clientAdded, this, &ClientLevel::clientAdded); connect(Workspace::self(), &Workspace::clientAdded, this, &ClientLevel::clientAdded);
connect(Workspace::self(), &Workspace::clientRemoved, this, &ClientLevel::clientRemoved); connect(Workspace::self(), &Workspace::clientRemoved, this, &ClientLevel::clientRemoved);
connect(model, SIGNAL(exclusionsChanged()), SLOT(reInit())); 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