Enhance window security by hiding content from screen capture on macOS
This commit is contained in:
parent
501dadd265
commit
553f26f458
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user