From 99ae0c99c6d11763da1cfec5239abce705775e7d Mon Sep 17 00:00:00 2001 From: jeffvli Date: Thu, 28 May 2026 00:45:59 -0700 Subject: [PATCH] fix restart requirement logic when switching windowbar style --- .../settings/components/window/window-settings.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/renderer/features/settings/components/window/window-settings.tsx b/src/renderer/features/settings/components/window/window-settings.tsx index cf859e887..8b8168f55 100644 --- a/src/renderer/features/settings/components/window/window-settings.tsx +++ b/src/renderer/features/settings/components/window/window-settings.tsx @@ -36,13 +36,12 @@ export const WindowSettings = memo(() => { if (!e) return; // Platform.LINUX is used as the native frame option regardless of the actual platform - const hasFrame = localSettings?.get('window_has_frame') as - | boolean - | undefined; - const isSwitchingToFrame = !hasFrame && e === Platform.LINUX; - const isSwitchingToNoFrame = hasFrame && e !== Platform.LINUX; - - const requireRestart = isSwitchingToFrame || isSwitchingToNoFrame; + const previousWindowBarStyle = settings.windowBarStyle; + const isSwitchingToNative = + previousWindowBarStyle !== Platform.LINUX && e === Platform.LINUX; + const isSwitchingFromNative = + previousWindowBarStyle === Platform.LINUX && e !== Platform.LINUX; + const requireRestart = isSwitchingToNative || isSwitchingFromNative; if (requireRestart) { openRestartRequiredToast();