Verified Commit 73fa0d12 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

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.
parent d54aaf5a
......@@ -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
......
Supports Markdown
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