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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user