1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-06 13:38:28 -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
+13 -7
View File
@@ -13,6 +13,9 @@ Item {
signal colorPickerRequested
signal barReady(var barConfig)
Component.onCompleted: BarWidgetService.registerDankBarItem(root.barConfig?.id, root)
Component.onDestruction: BarWidgetService.unregisterDankBarItem(root.barConfig?.id, root)
property alias barVariants: barVariants
property var hyprlandOverviewLoader: null
property bool systemTrayMenuOpen: false
@@ -161,14 +164,17 @@ Item {
id: barVariants
model: {
const prefs = root.barConfig?.screenPreferences || ["all"];
if (prefs.includes("all") || (typeof prefs[0] === "string" && prefs[0] === "all")) {
return Quickshell.screens;
const wantsAll = prefs.includes("all") || (typeof prefs[0] === "string" && prefs[0] === "all");
let base;
if (wantsAll) {
base = Quickshell.screens;
} else {
base = Quickshell.screens.filter(screen => SettingsData.isScreenInPreferences(screen, prefs));
if (base.length === 0 && root.barConfig?.showOnLastDisplay && Quickshell.screens.length === 1)
base = Quickshell.screens;
}
const filtered = Quickshell.screens.filter(screen => SettingsData.isScreenInPreferences(screen, prefs));
if (filtered.length === 0 && root.barConfig?.showOnLastDisplay && Quickshell.screens.length === 1) {
return Quickshell.screens;
}
return filtered;
// Connected frame mode renders the bar inside the frame surface; skip the standalone window there.
return base.filter(screen => !CompositorService.frameHostsSurfacesForScreen(screen));
}
delegate: DankBarWindow {