From 5ed1b58d67a10eb62bcb4b476997f91ac5de2136 Mon Sep 17 00:00:00 2001 From: Psychotoxical Date: Tue, 7 Apr 2026 22:05:31 +0200 Subject: [PATCH] feat(titlebar): hide custom title bar in native fullscreen (F11) Co-Authored-By: Claude Sonnet 4.6 --- src/App.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 7ce99a77..167b5121 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -75,6 +75,7 @@ function RequireAuth({ children }: { children: React.ReactNode }) { function AppShell() { const { t } = useTranslation(); const isMobile = useIsMobile(); + const [isWindowFullscreen, setIsWindowFullscreen] = useState(false); const isFullscreenOpen = usePlayerStore(s => s.isFullscreenOpen); const toggleFullscreen = usePlayerStore(s => s.toggleFullscreen); const isQueueVisible = usePlayerStore(s => s.isQueueVisible); @@ -261,14 +262,14 @@ function AppShell() { className="app-shell" data-mobile={isMobile || undefined} data-mobile-player={isMobilePlayer || undefined} - data-titlebar={(IS_LINUX && useCustomTitlebar) || undefined} + data-titlebar={(IS_LINUX && useCustomTitlebar && !isWindowFullscreen) || undefined} style={{ '--sidebar-width': isMobile ? '0px' : (isSidebarCollapsed ? '72px' : 'clamp(200px, 15vw, 220px)'), '--queue-width': isMobile ? '0px' : (isQueueVisible ? `${queueWidth}px` : '0px') } as React.CSSProperties} onContextMenu={e => e.preventDefault()} > - {IS_LINUX && useCustomTitlebar && } + {IS_LINUX && useCustomTitlebar && !isWindowFullscreen && } {!isMobile && ( win.setFullscreen(!fs)); + win.isFullscreen().then(fs => { + win.setFullscreen(!fs); + setIsWindowFullscreen(!fs); + }); break; } }