Make clicking notifications focus VC Desktop

This commit is contained in:
Vendicated
2023-04-05 05:19:48 +02:00
parent 2efed86b71
commit cf23b6d028
7 changed files with 36 additions and 7 deletions

View File

@@ -9,6 +9,8 @@ app.on("before-quit", () => {
isQuitting = true;
});
export let mainWin: BrowserWindow;
function initWindowOpenHandler(win: BrowserWindow) {
win.webContents.setWindowOpenHandler(({ url }) => {
switch (url) {
@@ -115,7 +117,7 @@ function initWindowBoundsListeners(win: BrowserWindow) {
}
export function createMainWindow() {
const win = new BrowserWindow({
const win = mainWin = new BrowserWindow({
show: false,
autoHideMenuBar: true,
webPreferences: {