make updater window close button close proper window
This commit is contained in:
parent
28282d1d76
commit
10b38e5b41
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
||||||
if (process.platform === "linux") import("./virtmic");
|
if (process.platform === "linux") import("./virtmic");
|
||||||
|
|
||||||
import { execFile } from "child_process";
|
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 { mkdirSync, readFileSync, watch } from "fs";
|
||||||
import { open, readFile } from "fs/promises";
|
import { open, readFile } from "fs/promises";
|
||||||
import { release } from "os";
|
import { release } from "os";
|
||||||
|
@ -71,7 +71,7 @@ handle(IpcEvents.FOCUS, () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
handle(IpcEvents.CLOSE, e => {
|
handle(IpcEvents.CLOSE, e => {
|
||||||
mainWin.close();
|
(BrowserWindow.fromWebContents(e.sender) ?? e.sender).close();
|
||||||
});
|
});
|
||||||
|
|
||||||
handle(IpcEvents.MINIMIZE, e => {
|
handle(IpcEvents.MINIMIZE, e => {
|
||||||
|
|
Loading…
Reference in a new issue