mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Merge pull request #991 from johankwarnmarksymphony/sda-2009
fix: screen share frame stay
This commit is contained in:
commit
03b49240ba
@ -507,14 +507,13 @@ export class WindowHandler {
|
||||
|
||||
if (browserWindow && windowExists(browserWindow)) {
|
||||
browserWindow.destroy();
|
||||
|
||||
if (isWindowsOS || isMac) {
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, []);
|
||||
} else {
|
||||
if (this.screenSharingFrameWindow && windowExists(this.screenSharingFrameWindow)) {
|
||||
this.screenSharingFrameWindow.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isWindowsOS || isMac) {
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, []);
|
||||
} else {
|
||||
if (this.screenSharingFrameWindow && windowExists(this.screenSharingFrameWindow)) {
|
||||
this.screenSharingFrameWindow.close();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -719,6 +718,12 @@ export class WindowHandler {
|
||||
this.addWindow(opts.winKey, this.screenPickerWindow);
|
||||
});
|
||||
ipcMain.once('screen-source-selected', (_event, source) => {
|
||||
const displays = electron.screen.getAllDisplays();
|
||||
logger.info('window-utils: displays.length: ' + displays.length);
|
||||
for (let i = 0, len = displays.length; i < len; i++) {
|
||||
logger.info('window-utils: display[' + i + ']: ' + JSON.stringify(displays[ i ]));
|
||||
}
|
||||
|
||||
if (source != null) {
|
||||
logger.info(`window-handler: screen-source-selected`, source, id);
|
||||
if (isWindowsOS || isMac) {
|
||||
@ -734,7 +739,13 @@ export class WindowHandler {
|
||||
if (source.display_id !== '') {
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, [ source.display_id ]);
|
||||
} else {
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, [ '0' ]);
|
||||
const dispId = source.id.split(':')[1];
|
||||
const keyId = 'id';
|
||||
|
||||
logger.info('window-utils: dispId: ' + dispId);
|
||||
logger.info('window-utils: displays [' + dispId + '] [id]: ' + displays [dispId] [ keyId ]);
|
||||
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, [ displays [dispId] [ keyId ].toString() ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user