mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Multi-Monitors: new setting to explicitely disable panels to appear on screen without bar.
On my setup this saves about 130MB per 1080p monitor where the bar is not shown. I only interact with noctalia on my main screen.
This commit is contained in:
@@ -18,12 +18,23 @@ Variants {
|
||||
if (!modelData || !modelData.name) {
|
||||
return false;
|
||||
}
|
||||
Logger.d("Shell", "MainScreen activated for", modelData?.name);
|
||||
return true;
|
||||
|
||||
let shouldLoad = true;
|
||||
if (!Settings.data.general.allowPanelsOnScreenWithoutBar) {
|
||||
// Check if bar is configured for this screen
|
||||
var monitors = Settings.data.bar.monitors || [];
|
||||
shouldLoad = monitors.length === 0 || monitors.includes(modelData?.name);
|
||||
}
|
||||
|
||||
if (shouldLoad) {
|
||||
Logger.d("AllScreens", "Screen activated: ", modelData?.name);
|
||||
}
|
||||
return shouldLoad;
|
||||
}
|
||||
|
||||
property bool windowLoaded: false
|
||||
|
||||
// Main Screen loader - Bar and panels backgrounds
|
||||
Loader {
|
||||
id: windowLoader
|
||||
active: parent.shouldBeActive
|
||||
@@ -58,7 +69,7 @@ Variants {
|
||||
}
|
||||
|
||||
onLoaded: {
|
||||
Logger.d("Shell", "BarContentWindow created for", modelData?.name);
|
||||
Logger.d("AllScreens", "BarContentWindow created for", modelData?.name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,14 +91,21 @@ Variants {
|
||||
}
|
||||
|
||||
onLoaded: {
|
||||
Logger.d("Shell", "BarExclusionZone created for", modelData?.name);
|
||||
Logger.d("AllScreens", "BarExclusionZone created for", modelData?.name);
|
||||
}
|
||||
}
|
||||
|
||||
// TrayMenuWindow - separate window for tray context menus
|
||||
// This must be a top-level PanelWindow.
|
||||
// Disabled when bar is hidden or not configured for this screen
|
||||
Loader {
|
||||
active: parent.windowLoaded && parent.shouldBeActive
|
||||
active: {
|
||||
if (!parent.windowLoaded || !parent.shouldBeActive || !BarService.isVisible)
|
||||
return false;
|
||||
|
||||
// Check if bar is configured for this screen
|
||||
var monitors = Settings.data.bar.monitors || [];
|
||||
return monitors.length === 0 || monitors.includes(modelData?.name);
|
||||
}
|
||||
asynchronous: false
|
||||
|
||||
sourceComponent: TrayMenuWindow {
|
||||
@@ -95,7 +113,7 @@ Variants {
|
||||
}
|
||||
|
||||
onLoaded: {
|
||||
Logger.d("Shell", "TrayMenuWindow created for", modelData?.name);
|
||||
Logger.d("AllScreens", "TrayMenuWindow created for", modelData?.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ PanelWindow {
|
||||
color: Color.transparent
|
||||
mask: null // No mask - content window is rectangular
|
||||
visible: isPanelOpen
|
||||
screen: placeholder.screen // Explicitly set screen to match placeholder
|
||||
|
||||
// Wayland layer shell configuration - fullscreen window
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
|
||||
Reference in New Issue
Block a user