mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
SDA-4219 (Change logic to use minimize/restore instead of hide/show) (#1908)
* SDA-4219 - Change from hide to minimize Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com> * SDA-4219 - Remove unused function Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com> * SDA-4241 - Revert fix for macOS Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com> --------- Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com>
This commit is contained in:
parent
2d75704d7f
commit
13289e66a0
@ -1,7 +1,7 @@
|
|||||||
import { BrowserWindow } from 'electron';
|
import { BrowserWindow } from 'electron';
|
||||||
import { presenceStatusStore } from '.';
|
import { presenceStatusStore } from '.';
|
||||||
import { apiName } from '../../common/api-interface';
|
import { apiName } from '../../common/api-interface';
|
||||||
import { isMac, isWindowsOS } from '../../common/env';
|
import { isMac } from '../../common/env';
|
||||||
import { logger } from '../../common/logger';
|
import { logger } from '../../common/logger';
|
||||||
import { presenceStatus } from '../presence-status-handler';
|
import { presenceStatus } from '../presence-status-handler';
|
||||||
import { ICustomBrowserWindow, windowHandler } from '../window-handler';
|
import { ICustomBrowserWindow, windowHandler } from '../window-handler';
|
||||||
@ -54,11 +54,15 @@ export class WindowStore {
|
|||||||
(currentWindow as ICustomBrowserWindow).winName !==
|
(currentWindow as ICustomBrowserWindow).winName !==
|
||||||
apiName.notificationWindowName
|
apiName.notificationWindowName
|
||||||
) {
|
) {
|
||||||
if (isFullScreen) {
|
if (isMac) {
|
||||||
this.hideFullscreenWindow(currentWindow);
|
if (isFullScreen) {
|
||||||
// No need to hide minimized windows
|
this.hideFullscreenWindow(currentWindow);
|
||||||
} else if (!isMinimized) {
|
// No need to hide minimized windows
|
||||||
currentWindow?.hide();
|
} else if (!isMinimized) {
|
||||||
|
currentWindow?.hide();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
currentWindow.minimize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -90,14 +94,14 @@ export class WindowStore {
|
|||||||
currentWindow.id || '',
|
currentWindow.id || '',
|
||||||
) as ICustomBrowserWindow;
|
) as ICustomBrowserWindow;
|
||||||
if (window) {
|
if (window) {
|
||||||
if (currentWindow.isFullScreen) {
|
if (isMac) {
|
||||||
fullscreenedWindows.push(currentWindow);
|
if (currentWindow.isFullScreen) {
|
||||||
// Window should be shown before putting it in fullscreen on Windows
|
fullscreenedWindows.push(currentWindow);
|
||||||
if (isWindowsOS) {
|
} else if (!currentWindow.minimized && !currentWindow.focused) {
|
||||||
window.show();
|
window.showInactive();
|
||||||
}
|
}
|
||||||
} else if (!currentWindow.minimized && !currentWindow.focused) {
|
} else {
|
||||||
window.showInactive();
|
window.restore();
|
||||||
}
|
}
|
||||||
if (currentWindow.focused) {
|
if (currentWindow.focused) {
|
||||||
focusedWindowToRestore = window;
|
focusedWindowToRestore = window;
|
||||||
|
Loading…
Reference in New Issue
Block a user