effects: Fix stacking order of windows relative to panels

Make windows thumbnails use their native stacking order as a 'z' value
for current desktop while lowering windows from other desktops.

By lowering others instead of raising current ones we get to use
stacking order compatible with desktop & dock/panel window types.

For now they are drawn separately, so this change doesn't do much on its
own, but it would become useful during refactoring when putting all
windows (regular and panel types) in a single parent with shared z stack.
This commit is contained in:
ivan tkachenko 2022-08-04 15:08:22 +03:00
parent d54aaf5aaa
commit 73fa0d124f
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3
4 changed files with 4 additions and 2 deletions

View file

@ -75,9 +75,9 @@ FocusScope {
wId: model.client.internalId
x: model.client.x - targetScreen.geometry.x
y: model.client.y - targetScreen.geometry.y
z: model.client.stackingOrder
width: model.client.width
height: model.client.height
z: model.client.stackingOrder
opacity: model.client.dock ? desktopView.panelOpacity : 1
}
}

View file

@ -312,6 +312,7 @@ FocusScope {
wId: model.client.internalId
x: model.client.x - targetScreen.geometry.x
y: model.client.y - targetScreen.geometry.y
z: model.client.stackingOrder
width: model.client.width
height: model.client.height
opacity: container.effect.gestureInProgress

View file

@ -71,7 +71,7 @@ Item {
visible: opacity > 0
z: activeDragHandler.active ? 1000
: client.stackingOrder + (client.desktop === KWinComponents.Workspace.currentDesktop ? 100 : 0)
: client.stackingOrder * (client.desktop === KWinComponents.Workspace.currentDesktop ? 1 : 0.001)
component TweenBehavior : Behavior {
enabled: thumb.state !== "partial" && thumb.windowHeap.animationEnabled && !thumb.activeDragHandler.active

View file

@ -208,6 +208,7 @@ Item {
wId: model.client.internalId
x: model.client.x - targetScreen.geometry.x
y: model.client.y - targetScreen.geometry.y
z: model.client.stackingOrder
visible: opacity > 0
opacity: (model.client.hidden || container.organized) ? 0 : 1