mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-23 01:16:24 -06:00
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:
parent
8b2912a189
commit
4d9b7258aa
@ -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;
|
||||
|
@ -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(),
|
||||
});
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user