1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-05 04:58:30 -04:00

frame: host bar and dock inside the frame surface in connected mode

Previously the bar-in-frame was rendered on the overlay layer always.
Now they are rendered inside of the frames top-layer surface, which lets
the compositor handle layer-shell layering natively.
This commit is contained in:
bbedward
2026-07-22 12:15:40 -04:00
parent ce548cb29c
commit 602697ef51
17 changed files with 2494 additions and 2118 deletions
+22 -7
View File
@@ -16,15 +16,23 @@ Scope {
return SettingsData.getActiveBarEdgesForScreen(screen);
}
// One thin invisible PanelWindow per edge.
// Skips any edge where a bar already provides its own exclusiveZone.
// One thin invisible PanelWindow per edge. A standalone bar reserves its own edge, so
// that edge is skipped — unless the frame hosts the bar (connected mode), where no bar
// window exists and the exclusion must reserve the full bar thickness itself.
readonly property bool screenEnabled: CompositorService.frameWindowVisibleForScreen(root.screen)
readonly property bool hostsBar: CompositorService.frameHostsSurfacesForScreen(root.screen)
function exclusionSizeForEdge(edge) {
return root.barEdges.includes(edge) ? SettingsData.frameBarSize : SettingsData.frameThickness;
}
Loader {
active: root.screenEnabled && !root.barEdges.includes("top")
readonly property bool isBarEdge: root.barEdges.includes("top")
active: root.screenEnabled && (!isBarEdge || root.hostsBar)
sourceComponent: EdgeExclusion {
targetScreen: root.screen
exclusionSize: root.exclusionSizeForEdge("top")
anchorTop: true
anchorLeft: true
anchorRight: true
@@ -32,9 +40,11 @@ Scope {
}
Loader {
active: root.screenEnabled && !root.barEdges.includes("bottom")
readonly property bool isBarEdge: root.barEdges.includes("bottom")
active: root.screenEnabled && (!isBarEdge || root.hostsBar)
sourceComponent: EdgeExclusion {
targetScreen: root.screen
exclusionSize: root.exclusionSizeForEdge("bottom")
anchorBottom: true
anchorLeft: true
anchorRight: true
@@ -42,9 +52,11 @@ Scope {
}
Loader {
active: root.screenEnabled && !root.barEdges.includes("left")
readonly property bool isBarEdge: root.barEdges.includes("left")
active: root.screenEnabled && (!isBarEdge || root.hostsBar)
sourceComponent: EdgeExclusion {
targetScreen: root.screen
exclusionSize: root.exclusionSizeForEdge("left")
anchorLeft: true
anchorTop: true
anchorBottom: true
@@ -52,9 +64,11 @@ Scope {
}
Loader {
active: root.screenEnabled && !root.barEdges.includes("right")
readonly property bool isBarEdge: root.barEdges.includes("right")
active: root.screenEnabled && (!isBarEdge || root.hostsBar)
sourceComponent: EdgeExclusion {
targetScreen: root.screen
exclusionSize: root.exclusionSizeForEdge("right")
anchorRight: true
anchorTop: true
anchorBottom: true
@@ -63,6 +77,7 @@ Scope {
component EdgeExclusion: PanelWindow {
required property var targetScreen
property real exclusionSize: SettingsData.frameThickness
screen: targetScreen
property bool anchorTop: false
@@ -72,7 +87,7 @@ Scope {
WlrLayershell.namespace: "dms:frame-exclusion"
WlrLayershell.layer: WlrLayer.Top
exclusiveZone: SettingsData.frameThickness
exclusiveZone: exclusionSize
color: "transparent"
mask: Region {}
implicitWidth: 1