From 679bdfca9db53f608a5a30d7518dac4b45a56423 Mon Sep 17 00:00:00 2001 From: Johan Kwarnmark Date: Wed, 8 Apr 2020 12:34:16 +0200 Subject: [PATCH 1/5] sda-1956 add more debug printouts --- src/app/window-handler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index b7f631e2..ecbd1422 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -830,8 +830,9 @@ export class WindowHandler { if (displayId !== '') { const displays = electron.screen.getAllDisplays(); - + logger.info('window-handler: createScreenSharingIndicatorWindow, displayId: ' + displayId); displays.forEach((element) => { + logger.info('window-handler: element.id.toString(): ' + element.id.toString()); if (displayId === element.id.toString()) { logger.info(`window-handler: element:`, element); if (isWindowsOS) { From 7b907960e35e96343eebb94f3c35f4334c3c1cfe Mon Sep 17 00:00:00 2001 From: Johan Kwarnmark Date: Wed, 8 Apr 2020 14:19:32 +0200 Subject: [PATCH 2/5] Moved printout --- src/app/window-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index ecbd1422..50744e5e 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -828,9 +828,9 @@ export class WindowHandler { }); } + logger.info('window-handler: createScreenSharingIndicatorWindow, displayId: ' + displayId); if (displayId !== '') { const displays = electron.screen.getAllDisplays(); - logger.info('window-handler: createScreenSharingIndicatorWindow, displayId: ' + displayId); displays.forEach((element) => { logger.info('window-handler: element.id.toString(): ' + element.id.toString()); if (displayId === element.id.toString()) { From a7edc9a1da99f55e02c4e781c82400fc0f2a6c47 Mon Sep 17 00:00:00 2001 From: Johan Kwarnmark Date: Tue, 14 Apr 2020 08:54:25 +0200 Subject: [PATCH 3/5] Update ScreenShareIndicatorFrame to version 1.4.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a597d52f..8cd2df87 100644 --- a/package.json +++ b/package.json @@ -165,7 +165,7 @@ }, "optionalDependencies": { "screen-snippet": "git+https://github.com/symphonyoss/ScreenSnippet2.git#v1.0.6", - "screen-share-indicator-frame": "git+https://github.com/symphonyoss/ScreenShareIndicatorFrame.git#v1.4.4", + "screen-share-indicator-frame": "git+https://github.com/symphonyoss/ScreenShareIndicatorFrame.git#v1.4.6", "swift-search": "2.0.2" }, "ava": { From 019fc9d33e285aeb5ed3ae48cff9782a39422875 Mon Sep 17 00:00:00 2001 From: Johan Kwarnmark Date: Tue, 14 Apr 2020 08:54:56 +0200 Subject: [PATCH 4/5] No deviceid found send 0 --- src/app/window-handler.ts | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 50744e5e..9a79c4f9 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -639,6 +639,13 @@ export class WindowHandler { } else if (isMac && type === 'screen') { const dispId = source.id.split(':')[1]; this.execCmd(this.screenShareIndicatorFrameUtil, [ dispId ]); + } else if (isWindowsOS && type === 'screen') { + logger.info('window-handler: source.display_id: ' + source.display_id); + if (source.display_id !== '') { + this.execCmd(this.screenShareIndicatorFrameUtil, [ source.display_id ]); + } else { + this.execCmd(this.screenShareIndicatorFrameUtil, [ '0' ]); + } } } } @@ -830,22 +837,20 @@ export class WindowHandler { logger.info('window-handler: createScreenSharingIndicatorWindow, displayId: ' + displayId); if (displayId !== '') { - const displays = electron.screen.getAllDisplays(); - displays.forEach((element) => { - logger.info('window-handler: element.id.toString(): ' + element.id.toString()); - if (displayId === element.id.toString()) { - logger.info(`window-handler: element:`, element); - if (isWindowsOS) { - this.execCmd(this.screenShareIndicatorFrameUtil, [ displayId ]); - } else if (isLinux) { - this.createScreenSharingFrameWindow('screen-sharing-frame', - element.workArea.width, - element.workArea.height, - element.workArea.x, - element.workArea.y); + if (isLinux) { + const displays = electron.screen.getAllDisplays(); + displays.forEach((element) => { + logger.info('window-handler: element.id.toString(): ' + element.id.toString()); + if (displayId === element.id.toString()) { + logger.info(`window-handler: element:`, element); + this.createScreenSharingFrameWindow('screen-sharing-frame', + element.workArea.width, + element.workArea.height, + element.workArea.x, + element.workArea.y); } - } - }); + }); + } } this.screenSharingIndicatorWindow = createComponentWindow('screen-sharing-indicator', opts); From e4645dce6a1cfb4585b148834950ab402eb04a1b Mon Sep 17 00:00:00 2001 From: Johan Kwarnmark Date: Tue, 14 Apr 2020 15:44:44 +0200 Subject: [PATCH 5/5] Solve merge conflict with master, use the latest 1.0.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8cd2df87..de788a33 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "systeminformation": "4.23.0" }, "optionalDependencies": { - "screen-snippet": "git+https://github.com/symphonyoss/ScreenSnippet2.git#v1.0.6", + "screen-snippet": "git+https://github.com/symphonyoss/ScreenSnippet2.git#v1.0.7", "screen-share-indicator-frame": "git+https://github.com/symphonyoss/ScreenShareIndicatorFrame.git#v1.4.6", "swift-search": "2.0.2" },