fix: SDA-2279 (Filter out notification windows from desktop capturer) (#1064)

* fix: SDA-2279 - Filter out notification windows from desktop-capturer.ts

* fix: SDA-2279 - Move notification window title to const

* fix: SDA-2279 - Remove isWindowsOS to also support other platform
This commit is contained in:
Kiran Niranjan 2020-09-03 17:01:14 +05:30 committed by GitHub
parent 8b2912a189
commit 4d9b7258aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -51,6 +51,8 @@ export enum apiName {
notificationWindowName = 'notification-window',
}
export const NOTIFICATION_WINDOW_TITLE = 'Notification - Symphony';
export interface IApiArgs {
memoryInfo: Electron.ProcessMemoryInfo;
word: string;

View File

@ -6,7 +6,7 @@ import {
SourcesOptions,
} from 'electron';
import { apiCmds, apiName } from '../common/api-interface';
import { apiCmds, apiName, NOTIFICATION_WINDOW_TITLE } from '../common/api-interface';
import { isWindowsOS } from '../common/env';
import { i18n } from '../common/i18n-preload';
@ -120,7 +120,9 @@ export const getSource = async (options: ICustomSourcesOptions, callback: Callba
}
const updatedSources = sources.map((source) => {
const updatedSources = sources
.filter((source) => source.name !== NOTIFICATION_WINDOW_TITLE)
.map((source) => {
return Object.assign({}, source, {
thumbnail: source.thumbnail.toDataURL(),
});

View File

@ -3,7 +3,7 @@ import { app, BrowserWindow, ipcMain } from 'electron';
import { config } from '../app/config-handler';
import { createComponentWindow, windowExists } from '../app/window-utils';
import { AnimationQueue } from '../common/animation-queue';
import { apiName, INotificationData, NotificationActions } from '../common/api-interface';
import { apiName, INotificationData, NOTIFICATION_WINDOW_TITLE, NotificationActions } from '../common/api-interface';
import { isNodeEnv, isWindowsOS } from '../common/env';
import { logger } from '../common/logger';
import NotificationHandler from './notification-handler';
@ -470,7 +470,7 @@ class Notification extends NotificationHandler {
transparent: true,
fullscreenable: false,
acceptFirstMouse: true,
title: 'Notification - Symphony',
title: NOTIFICATION_WINDOW_TITLE,
webPreferences: {
sandbox: !isNodeEnv,
nodeIntegration: isNodeEnv,