SDA-3656 Bring to front SDA windows

This commit is contained in:
sbenmoussati 2022-05-11 22:58:40 +02:00 committed by Salah Benmoussati
parent e258aa3460
commit d887bbddf2
3 changed files with 21 additions and 13 deletions

12
package-lock.json generated
View File

@ -6059,9 +6059,9 @@
}
},
"electron": {
"version": "17.4.2",
"resolved": "https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/electron/-/electron-17.4.2.tgz",
"integrity": "sha1-+1ImEA/D9dbjGcytf6RivxXuDZQ=",
"version": "17.4.4",
"resolved": "https://registry.npmjs.org/electron/-/electron-17.4.4.tgz",
"integrity": "sha512-/CqXJwm1VLfhF7+QhCrPEoePcpGMdRh09A+sVHX+kgT1twrmNH8S+ZeMPYxX8EU0O0Eki3UfA5zA2ADWaCDq2Q==",
"dev": true,
"requires": {
"@electron/get": "^1.13.0",
@ -6070,9 +6070,9 @@
},
"dependencies": {
"@types/node": {
"version": "14.18.16",
"resolved": "https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/@types/node/-/node-14.18.16.tgz",
"integrity": "sha1-h49nC6PwBIK/hZtlULYBBhD8VLU=",
"version": "14.18.17",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.17.tgz",
"integrity": "sha512-oajWz4kOajqpKJMPgnCvBajPq8QAvl2xIWoFjlAJPKGu6n7pjov5SxGE45a+0RxHDoo4ycOMoZw1SCOWtDERbw==",
"dev": true
}
}

View File

@ -20,8 +20,8 @@
"compile:robot": "npm rebuild --build-from-source robotjs",
"dev": "gulp build && npm run browserify && cross-env ELECTRON_DEV=true electron .",
"demo": "run-os",
"demo:win32": "npm run prebuild && cross-env ELECTRON_DEV=true electron . --url=file:///src/demo/index.html",
"demo:darwin": "npm run prebuild && cross-env ELECTRON_DEV=true electron . --url=file://$(pwd)/src/demo/index.html",
"demo:win32": "gulp build && npm run browserify && cross-env ELECTRON_DEV=true electron . --url=file:///src/demo/index.html",
"demo:darwin": "gulp build && npm run browserify && cross-env ELECTRON_DEV=true electron . --url=file://$(pwd)/src/demo/index.html",
"format": "pretty-quick",
"lint": "run-s lint:*",
"lint:project": "tslint --project tsconfig.json",
@ -125,7 +125,7 @@
"browserify": "16.5.1",
"cross-env": "5.2.0",
"del": "3.0.0",
"electron": "^17.4.2",
"electron": "^17.4.4",
"electron-builder": "22.7.0",
"electron-builder-squirrel-windows": "20.38.3",
"electron-icon-maker": "0.0.4",

View File

@ -1446,10 +1446,17 @@ export class WindowHandler {
this.execCmd(this.screenShareIndicatorFrameUtil, []);
const timeoutValue = 300;
setTimeout(
() => this.drawScreenShareIndicatorFrame(source),
timeoutValue,
);
setTimeout(() => {
this.drawScreenShareIndicatorFrame(source);
if (isMac) {
const windows = BrowserWindow.getAllWindows();
windows.map((window: BrowserWindow) => {
if (window.getMediaSourceId() === source.id) {
window.show();
}
});
}
}, timeoutValue);
}
};
@ -1471,6 +1478,7 @@ export class WindowHandler {
// This behaviour was observed while trying to upgrade from Electron 14 to Electron 17
// Here the hack to solve that issue is to create a new invisible BrowserWindow.
this.screenPickerPlaceholderWindow = new BrowserWindow({
title: 'Screen sharing - Symphony',
width: 0,
height: 0,
transparent: true,