diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 6e9a05c..8fdb6ee 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -442,8 +442,7 @@ function createMainWindow() { const runVencordMain = once(() => require(join(VENCORD_FILES_DIR, "vencordDesktopMain.js"))); export async function createWindows() { - const { startMinimized } = Settings.store; - const splash = createSplashWindow(startMinimized); + const splash = createSplashWindow(); // SteamOS letterboxes and scales it terribly, so just full screen it if (isDeckGameMode) splash.setFullScreen(true); await ensureVencordFiles(); @@ -453,8 +452,11 @@ export async function createWindows() { mainWin.webContents.on("did-finish-load", () => { splash.destroy(); + mainWin!.show(); - if (!startMinimized || isDeckGameMode) mainWin!.show(); + if (Settings.store.maximized && !isDeckGameMode) { + mainWin!.maximize(); + } if (isDeckGameMode) { // always use entire display @@ -464,11 +466,5 @@ export async function createWindows() { } }); - mainWin.once("show", () => { - if (Settings.store.maximized && !mainWin!.isMaximized() && !isDeckGameMode) { - mainWin!.maximize(); - } - }); - initArRPC(); } diff --git a/src/main/splash.ts b/src/main/splash.ts index 7c05de9..f21799d 100644 --- a/src/main/splash.ts +++ b/src/main/splash.ts @@ -11,11 +11,10 @@ import { ICON_PATH, VIEW_DIR } from "shared/paths"; import { Settings } from "./settings"; -export function createSplashWindow(startMinimized = false) { +export function createSplashWindow() { const splash = new BrowserWindow({ ...SplashProps, - icon: ICON_PATH, - show: !startMinimized + icon: ICON_PATH }); splash.loadFile(join(VIEW_DIR, "splash.html")); diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx index b90c746..f818c3c 100644 --- a/src/renderer/components/Settings.tsx +++ b/src/renderer/components/Settings.tsx @@ -49,8 +49,7 @@ export default function SettingsUi() { "Open Links in app (experimental)", "Opens links in a new Vesktop window instead of your web browser" ], - ["checkUpdates", "Check for updates", "Automatically check for Vesktop updates", true], - ["startMinimized", "Start minimized", "Vesktop remains in minimized mode on start", false] + ["checkUpdates", "Check for updates", "Automatically check for Vesktop updates", true] ]; const switches = allSwitches.filter(isTruthy); diff --git a/src/shared/settings.d.ts b/src/shared/settings.d.ts index 236cdfc..5cb6ca0 100644 --- a/src/shared/settings.d.ts +++ b/src/shared/settings.d.ts @@ -19,7 +19,6 @@ export interface Settings { arRPC?: boolean; appBadge?: boolean; discordWindowsTitleBar?: boolean; - startMinimized?: boolean; maximized?: boolean; minimized?: boolean;