From d0e8cb2b3159e1f19da69914f28d960a47174c15 Mon Sep 17 00:00:00 2001 From: Johan Kwarnmark Date: Fri, 1 Nov 2019 11:02:40 +0100 Subject: [PATCH] Moved hard coded top position of screen share indicator window to a variable topPositionOfIndicatorScreen --- src/app/window-handler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 08123938..a208d3dc 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -665,6 +665,8 @@ export class WindowHandler { (displayId && electron.screen.getAllDisplays().filter((d) => displayId.includes(d.id.toString()))[0]) || electron.screen.getPrimaryDisplay(); + const topPositionOfIndicatorScreen = 16; + const screenRect = indicatorScreen.workArea; // Set stream id as winKey to link stream to the window let opts = { @@ -690,7 +692,7 @@ export class WindowHandler { if (opts.width && opts.height) { opts = Object.assign({}, opts, { x: screenRect.x + Math.round((screenRect.width - opts.width) / 2), - y: screenRect.y + 16, + y: screenRect.y + topPositionOfIndicatorScreen, }); }