Enhance window security by hiding content from screen capture on macOS

This commit is contained in:
Илья Глазунов 2026-01-15 04:28:22 +03:00
parent 501dadd265
commit 553f26f458

View File

@ -582,12 +582,19 @@ function setupWindowIpcHandlers(mainWindow, sendToRenderer, geminiSessionRef) {
resizable: false, resizable: false,
movable: false, movable: false,
hasShadow: false, hasShadow: false,
// Hide from screen capture/sharing
...(process.platform === 'darwin' ? { type: 'panel' } : {}),
webPreferences: { webPreferences: {
nodeIntegration: true, nodeIntegration: true,
contextIsolation: false, contextIsolation: false,
}, },
}); });
// Hide window content from screen capture (macOS)
if (process.platform === 'darwin') {
regionSelectionWindow.setContentProtection(true);
}
regionSelectionWindow.setAlwaysOnTop(true, 'screen-saver', 1); regionSelectionWindow.setAlwaysOnTop(true, 'screen-saver', 1);
// Create HTML content for selection overlay // Create HTML content for selection overlay