effects/windowview: Fix "active class" mode
Each screen has its own WindowHeap. So setting WindowHeap.activeClass won't be visible on other screens. In order to address that limitation, we could monitor Workspace.activeClient property. BUG: 455974
This commit is contained in:
parent
bc964ffd37
commit
be784ba5d2
2 changed files with 6 additions and 17 deletions
|
@ -35,7 +35,6 @@ FocusScope {
|
|||
property real padding: 0
|
||||
// Either a string "activeClass" or a list internalIds of clients
|
||||
property var showOnly: []
|
||||
property string activeClass
|
||||
|
||||
required property bool organized
|
||||
readonly property bool effectiveOrganized: expoLayout.ready && organized
|
||||
|
|
|
@ -27,8 +27,12 @@ Item {
|
|||
readonly property bool initialHidden: client.minimized || !presentOnCurrentDesktop
|
||||
readonly property bool activeHidden: {
|
||||
if (windowHeap.showOnly === "activeClass") {
|
||||
// client.resourceName is not an actual String as comes from a QByteArray so === would fail
|
||||
return windowHeap.activeClass !== String(client.resourceName);
|
||||
if (!KWinComponents.Workspace.activeClient) {
|
||||
return true;
|
||||
} else {
|
||||
// client.resourceName is not an actual String as comes from a QByteArray so === would fail
|
||||
return String(KWinComponents.Workspace.activeClient.resourceName) !== String(client.resourceName);
|
||||
}
|
||||
} else {
|
||||
return windowHeap.showOnly.length !== 0
|
||||
&& windowHeap.showOnly.indexOf(client.internalId) === -1;
|
||||
|
@ -52,20 +56,6 @@ Item {
|
|||
readonly property alias downGestureProgress: touchDragHandler.downGestureProgress
|
||||
signal downGestureTriggered()
|
||||
|
||||
Component.onCompleted: {
|
||||
if (client.active) {
|
||||
windowHeap.activeClass = client.resourceName;
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: thumb.client
|
||||
function onActiveChanged() {
|
||||
if (thumb.client.active) {
|
||||
thumb.windowHeap.activeClass = thumb.client.resourceName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
state: {
|
||||
if (effect.gestureInProgress) {
|
||||
return "partial";
|
||||
|
|
Loading…
Reference in a new issue