forked from Shinonome/dots-hyprland
overview: force floating windows to be on top of tiling ones (#2068)
This commit is contained in:
@@ -148,17 +148,16 @@ Item {
|
|||||||
model: ScriptModel {
|
model: ScriptModel {
|
||||||
values: {
|
values: {
|
||||||
// console.log(JSON.stringify(ToplevelManager.toplevels.values.map(t => t), null, 2))
|
// console.log(JSON.stringify(ToplevelManager.toplevels.values.map(t => t), null, 2))
|
||||||
return ToplevelManager.toplevels.values.filter((toplevel) => {
|
return [...ToplevelManager.toplevels.values.filter((toplevel) => {
|
||||||
const address = `0x${toplevel.HyprlandToplevel?.address}`
|
const address = `0x${toplevel.HyprlandToplevel?.address}`
|
||||||
var win = windowByAddress[address]
|
var win = windowByAddress[address]
|
||||||
const inWorkspaceGroup = (root.workspaceGroup * root.workspacesShown < win?.workspace?.id && win?.workspace?.id <= (root.workspaceGroup + 1) * root.workspacesShown)
|
const inWorkspaceGroup = (root.workspaceGroup * root.workspacesShown < win?.workspace?.id && win?.workspace?.id <= (root.workspaceGroup + 1) * root.workspacesShown)
|
||||||
return inWorkspaceGroup;
|
return inWorkspaceGroup;
|
||||||
})
|
})].reverse()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delegate: OverviewWindow {
|
delegate: OverviewWindow {
|
||||||
id: window
|
id: window
|
||||||
windowData: windowByAddress[address]
|
|
||||||
required property var modelData
|
required property var modelData
|
||||||
property int monitorId: windowData?.monitor
|
property int monitorId: windowData?.monitor
|
||||||
property var monitor: HyprlandData.monitors.find(m => m.id == monitorId)
|
property var monitor: HyprlandData.monitors.find(m => m.id == monitorId)
|
||||||
@@ -169,6 +168,7 @@ Item {
|
|||||||
availableWorkspaceWidth: root.workspaceImplicitWidth
|
availableWorkspaceWidth: root.workspaceImplicitWidth
|
||||||
availableWorkspaceHeight: root.workspaceImplicitHeight
|
availableWorkspaceHeight: root.workspaceImplicitHeight
|
||||||
widgetMonitorId: root.monitor.id
|
widgetMonitorId: root.monitor.id
|
||||||
|
windowData: windowByAddress[address]
|
||||||
|
|
||||||
property bool atInitPosition: (initX == x && initY == y)
|
property bool atInitPosition: (initX == x && initY == y)
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
z: atInitPosition ? root.windowZ : root.windowDraggingZ
|
z: atInitPosition ? (root.windowZ + windowData?.floating) : root.windowDraggingZ
|
||||||
Drag.hotSpot.x: targetWindowWidth / 2
|
Drag.hotSpot.x: targetWindowWidth / 2
|
||||||
Drag.hotSpot.y: targetWindowHeight / 2
|
Drag.hotSpot.y: targetWindowHeight / 2
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|||||||
Reference in New Issue
Block a user