Skip to content
This repository was archived by the owner on Oct 25, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"lint": "cross-env NODE_ENV=development eslint . --ext .js,.jsx,.ts,.tsx",
"lint:fix": "cross-env NODE_ENV=development eslint . --ext .js,.jsx,.ts,.tsx --fix",
"package": "ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --publish never && npm run build:dll",
"package-mac": "ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --mac --publish never && npm run build:dll",
"package-win": "ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --win --publish never && npm run build:dll",
"package-linux": "ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --linux --publish never && npm run build:dll",
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir release/app",
"prestart": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true NODE_OPTIONS=\"-r ts-node/register --no-warnings\" webpack --config ./.erb/configs/webpack.config.main.dev.ts",
"start": "ts-node ./.erb/scripts/check-port-in-use.js && npm run prestart && npm run start:renderer",
Expand Down Expand Up @@ -234,7 +237,12 @@
},
"win": {
"target": [
"nsis"
{
"target": "nsis",
"arch": [
"x64"
]
}
]
},
"linux": {
Expand Down
2 changes: 1 addition & 1 deletion src/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const GEMINI_MODELS = {
GEMINI_1_5_PRO: 'gemini-1.5-pro',
GEMINI_2_0_FLASH: 'gemini-2.0-flash',
GEMINI_2_0_FLASH_LITE: 'gemini-2.0-flash-lite',
GEMINI_2_5_PRO: 'gemini-2.5-pro-exp-03-25',
GEMINI_2_5_PRO: 'gemini-2.5-pro',
} as const;

export const RECOMMENDED_EXTRACTION_MODEL = [
Expand Down
20 changes: 13 additions & 7 deletions src/main/helper/MainWindowHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
? path.join(__dirname, 'preload.js')
: path.join(__dirname, '../../.erb/dll/preload.js'),
scrollBounce: true,
// Disable hardware acceleration to fix screen sharing black screen
webSecurity: true,
backgroundThrottling: false,
},
show: true,
frame: false,
Expand Down Expand Up @@ -120,19 +123,22 @@
return { action: 'deny' };
});

// Enhanced screen capture resistance
this.mainWindow.setContentProtection(true);
// Note: Commented out screen capture resistance features to fix black screen during screen sharing
// If you need these features, they may interfere with screen sharing functionality

Check failure on line 128 in src/main/helper/MainWindowHelper.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

Delete `ยทยทยทยท`
// Enhanced screen capture resistance - DISABLED for screen sharing compatibility
// this.mainWindow.setContentProtection(true);
this.mainWindow.setVisibleOnAllWorkspaces(true, {
visibleOnFullScreen: true,
});
this.mainWindow.setAlwaysOnTop(true, 'screen-saver', 1);
this.mainWindow.setIgnoreMouseEvents(true, { forward: true });

// Additional screen capture resistance settings
// Additional screen capture resistance settings - MODIFIED for screen sharing compatibility
if (process.platform === 'darwin') {
// Prevent window from being captured in screenshots
// Prevent window from being captured in screenshots - DISABLED
this.mainWindow.setWindowButtonVisibility(false);
this.mainWindow.setHiddenInMissionControl(true);
// this.mainWindow.setHiddenInMissionControl(true); // DISABLED - causes issues with screen sharing
this.mainWindow.setBackgroundColor('#00000000');

// Prevent window from being included in window switcher
Expand All @@ -142,9 +148,9 @@
this.mainWindow.setHasShadow(false);
}

// Prevent the window from being captured by screen recording
// Prevent the window from being captured by screen recording - MODIFIED
this.mainWindow.webContents.setBackgroundThrottling(false);
this.mainWindow.webContents.setFrameRate(60);
// this.mainWindow.webContents.setFrameRate(60); // This can cause issues with screen sharing

stateManager.subscribe((state) => {
if (this.mainWindow) {
Expand Down
6 changes: 6 additions & 0 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
import { initializeStateManager } from './stateManager';
import { isDebug } from './constant';

// Fix for black screen during screen sharing
// Disable hardware acceleration features that can interfere with screen capture
app.commandLine.appendSwitch('disable-features', 'VizDisplayCompositor,UseSkiaRenderer');

Check failure on line 20 in src/main/main.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

Replace `'disable-features',ยท'VizDisplayCompositor,UseSkiaRenderer'` with `โŽยทยท'disable-features',โŽยทยท'VizDisplayCompositor,UseSkiaRenderer',โŽ`
app.commandLine.appendSwitch('disable-gpu-sandbox');
app.commandLine.appendSwitch('disable-software-rasterizer');

if (process.env.NODE_ENV === 'production') {
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install();
Expand Down
Loading
Loading