make updater window close button close proper window

This commit is contained in:
Vendicated 2023-10-25 00:30:35 +02:00
parent 28282d1d76
commit 10b38e5b41
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -7,7 +7,7 @@
if (process.platform === "linux") import("./virtmic");
import { execFile } from "child_process";
import { app, dialog, RelaunchOptions, session, shell } from "electron";
import { app, BrowserWindow, dialog, RelaunchOptions, session, shell } from "electron";
import { mkdirSync, readFileSync, watch } from "fs";
import { open, readFile } from "fs/promises";
import { release } from "os";
@ -71,7 +71,7 @@ handle(IpcEvents.FOCUS, () => {
});
handle(IpcEvents.CLOSE, e => {
mainWin.close();
(BrowserWindow.fromWebContents(e.sender) ?? e.sender).close();
});
handle(IpcEvents.MINIMIZE, e => {