From afd2aa915853847fc655fb487f2fcfea8c297767 Mon Sep 17 00:00:00 2001 From: Tim Cheung Date: Wed, 16 Feb 2022 13:10:31 +0000 Subject: [PATCH] fix mouse back/forward triggering twice on linux (#315) --- src/main/main-window/index.ts | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/main/main-window/index.ts b/src/main/main-window/index.ts index e153e000..17824136 100644 --- a/src/main/main-window/index.ts +++ b/src/main/main-window/index.ts @@ -1,11 +1,9 @@ import * as path from 'path' import { app, BrowserWindow, nativeTheme, ipcMain } from 'electron' import { is } from 'electron-util' -import { getSelectedAccount } from '../accounts' import config, { ConfigKey } from '../config' import { toggleAppVisiblityTrayItem } from '../tray' import { - getAccountView, getSelectedAccountView, updateAllAccountViewBounds } from '../account-views' @@ -91,25 +89,6 @@ export function createMainWindow(): void { mainWindow.loadFile(path.resolve(__dirname, indexHTML)) - mainWindow.on('app-command', (_event, command) => { - const selectedAccount = getSelectedAccount() - - if (!selectedAccount) { - return - } - - const accountView = getAccountView(selectedAccount.id) - - if (command === 'browser-backward' && accountView.webContents.canGoBack()) { - accountView.webContents.goBack() - } else if ( - command === 'browser-forward' && - accountView.webContents.canGoForward() - ) { - accountView.webContents.goForward() - } - }) - mainWindow.on('close', (event) => { // Workaround: Closing the main window when on full screen leaves a black screen // https://github.com/electron/electron/issues/20263