Port Discord's windows title bar (#86)

This commit is contained in:
V
2023-08-07 00:23:27 +02:00
committed by GitHub
parent 57006e7e52
commit 3108de7c79
9 changed files with 81 additions and 16 deletions

View File

@@ -73,7 +73,19 @@ ipcMain.handle(IpcEvents.FOCUS, () => {
});
ipcMain.handle(IpcEvents.CLOSE, e => {
e.sender.close();
mainWin.close();
});
ipcMain.handle(IpcEvents.MINIMIZE, e => {
mainWin.minimize();
});
ipcMain.handle(IpcEvents.MAXIMIZE, e => {
if (mainWin.isMaximized()) {
mainWin.unmaximize();
} else {
mainWin.maximize();
}
});
ipcMain.handle(IpcEvents.SPELLCHECK_SET_LANGUAGES, (_, languages: string[]) => {