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.
master
ivan tkachenko 2 years ago
parent d54aaf5aaa
commit 73fa0d124f
No known key found for this signature in database
GPG Key ID: AF72731B7C654CB3

@ -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
}
}

@ -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

@ -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

@ -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

Loading…
Cancel
Save