1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

Update Topbar Autohide Fullscreen Edgecase

This commit is contained in:
purian23
2025-09-21 16:20:17 -04:00
parent c3b3edcae8
commit 227081c5c9

View File

@@ -150,10 +150,28 @@ PanelWindow {
property real backgroundTransparency: SettingsData.topBarTransparency
property bool autoHide: SettingsData.topBarAutoHide
property bool isFullscreenWindow: {
const activeWindow = ToplevelManager.activeToplevel
if (!activeWindow || !root.screen) return false
if (activeWindow.fullscreen !== undefined) {
return activeWindow.fullscreen
}
const screenGeometry = root.screen.geometry
if (!screenGeometry || !activeWindow.geometry) return false
return activeWindow.geometry.width >= screenGeometry.width &&
activeWindow.geometry.height >= screenGeometry.height
}
property bool reveal: {
if (CompositorService.isNiri && NiriService.inOverview) {
return SettingsData.topBarOpenOnOverview
}
if (isFullscreenWindow) {
return topBarMouseArea.containsMouse || hasActivePopout
}
return SettingsData.topBarVisible && (!autoHide || topBarMouseArea.containsMouse || hasActivePopout)
}