SDA-1897 Unify screenshare indicator frame handling for window/fullscreen

This commit is contained in:
Mattias Gustavsson 2020-03-19 15:23:37 +01:00
parent a104af42c6
commit e94fb41e47

View File

@ -6,7 +6,7 @@ import * as path from 'path';
import { format, parse } from 'url';
import { apiName, WindowTypes } from '../common/api-interface';
import { isDevEnv, isMac, isNodeEnv, isWindowsOS } from '../common/env';
import { isDevEnv, isLinux, isMac, isNodeEnv, isWindowsOS } from '../common/env';
import { i18n, LocaleType } from '../common/i18n';
import { logger } from '../common/logger';
import { getCommandLineArgs, getGuid } from '../common/utils';
@ -604,6 +604,9 @@ export class WindowHandler {
if (type === 'window') {
const hwnd = source.id.split(':')[1];
this.execCmd(this.screenShareIndicatorFrameUtil, [ hwnd ]);
} else if (type === 'screen') {
const dispId = source.id.split(':')[1];
this.execCmd(this.screenShareIndicatorFrameUtil, [ dispId ]);
}
}
}
@ -799,9 +802,7 @@ export class WindowHandler {
displays.forEach((element) => {
if (displayId === element.id.toString()) {
logger.info(`window-handler: element:`, element);
if (isWindowsOS || isMac) {
this.execCmd(this.screenShareIndicatorFrameUtil, [ displayId ]);
} else {
if (isLinux) {
this.createScreenSharingFrameWindow('screen-sharing-frame',
element.workArea.width,
element.workArea.height,