[MM-52625] Rework tray icon code into a class, make the behaviour of the tray icon consistent with the OS it's running on (#2708)

* Rework tray into a class, make click behaviour consistent

* Fix issue where app wouldn't switch to workspace where the app was visible

* Fixed an issue where the app would show the window with hideOnStart enabled

* Add comment about StatusIconLinuxDbus

* Fix tests
This commit is contained in:
Devin Binnie
2023-05-04 09:21:50 -04:00
committed by GitHub
parent 78dc529d32
commit c20088f6fa
11 changed files with 172 additions and 166 deletions

View File

@@ -26,6 +26,7 @@ import {
SESSION_EXPIRED,
MAIN_WINDOW_CREATED,
MAIN_WINDOW_RESIZED,
MAIN_WINDOW_FOCUSED,
} from 'common/communication';
import Config from 'common/config';
import {Logger} from 'common/log';
@@ -61,6 +62,7 @@ export class ViewManager {
MainWindow.on(MAIN_WINDOW_CREATED, this.init);
MainWindow.on(MAIN_WINDOW_RESIZED, this.handleSetCurrentViewBounds);
MainWindow.on(MAIN_WINDOW_FOCUSED, this.focusCurrentView);
ipcMain.handle(GET_VIEW_INFO_FOR_TEST, this.handleGetViewInfoForTest);
ipcMain.on(HISTORY, this.handleHistory);
ipcMain.on(REACT_APP_INITIALIZED, this.handleReactAppInitialized);
@@ -76,8 +78,6 @@ export class ViewManager {
}
private init = () => {
MainWindow.onBrowserWindow?.('focus', this.focusCurrentView);
LoadingScreen.show();
ServerManager.getAllServers().forEach((server) => this.loadServer(server));
this.showInitial();