windowview: handle windows from other virtual desktops better

Sometimes windows on other desktops are higher in the stacking order,
which causes them to unexpectedly jump above windows from the current
desktop in the effect.

To fix that, the z index is adjusted to be higher for windows on the active
virtual desktop, and windows from other desktops get reduced opacity in the
beginning of the animation
This commit is contained in:
Xaver Hugl 2022-07-06 16:42:37 +02:00
parent c49620658f
commit 5451c7e0db

View file

@ -70,7 +70,7 @@ Item {
}
visible: opacity > 0
z: thumb.activeDragHandler.active ? 100 : client.stackingOrder
z: thumb.activeDragHandler.active ? 100 : client.stackingOrder + (thumb.client.desktop == KWinComponents.Workspace.currentDesktop ? 100 : 0)
component TweenBehavior : Behavior {
enabled: thumb.state !== "partial" && thumb.windowHeap.animationEnabled && !thumb.activeDragHandler.active
@ -215,7 +215,7 @@ Item {
y: (thumb.client.y - targetScreen.geometry.y - (thumb.windowHeap.absolutePositioning ? windowHeap.layout.Kirigami.ScenePosition.y : 0)) * (1 - effect.partialActivationFactor) + cell.y * effect.partialActivationFactor
width: thumb.client.width * (1 - effect.partialActivationFactor) + cell.width * effect.partialActivationFactor
height: thumb.client.height * (1 - effect.partialActivationFactor) + cell.height * effect.partialActivationFactor
opacity: thumb.client.minimized ? effect.partialActivationFactor : 1
opacity: thumb.client.minimized || thumb.client.desktop != KWinComponents.Workspace.currentDesktop ? effect.partialActivationFactor : 1
}
PropertyChanges {
target: icon