SDA-4528: Minimize Windows wont disappear on capture with SDA Hidden

This commit is contained in:
NguyenTranHoangSym 2024-04-09 09:26:59 +07:00
parent 98f638bff6
commit 3a8a8442df

View File

@ -95,16 +95,19 @@ export class WindowStore {
const fullscreenedWindows: IWindowState[] = []; const fullscreenedWindows: IWindowState[] = [];
// Restoring all windows except focused one // Restoring all windows except focused one
storedWindows.windows.forEach((currentWindow) => { storedWindows.windows.forEach((currentWindow) => {
if (currentWindow && currentWindow.isVisible) { if (currentWindow) {
const window: ICustomBrowserWindow | undefined = getWindowByName( const window: ICustomBrowserWindow | undefined = getWindowByName(
currentWindow.id || '', currentWindow.id || '',
) as ICustomBrowserWindow; ) as ICustomBrowserWindow;
if (window) { if (window) {
if (currentWindow.isFullScreen) { if (currentWindow.isFullScreen) {
fullscreenedWindows.push(currentWindow); fullscreenedWindows.push(currentWindow);
} else if (!currentWindow.minimized && !currentWindow.focused) { } else if (!currentWindow.focused) {
window.showInactive(); window.showInactive();
window.moveTop(); window.moveTop();
if (currentWindow.minimized) {
window.minimize();
}
} }
if (currentWindow.focused) { if (currentWindow.focused) {
focusedWindowToRestore = window; focusedWindowToRestore = window;