SDA-4422 Bug - Workaroud for frameless transparent windows titlebar being displayed (#2041)

This commit is contained in:
Salah Benmoussati authored and GitHub committed 2023-12-28 09:59:37 +01:00
1 parent c79922fbd7
commit 8422af2faa
1 file changed
+10
+10
View File
@@ -227,6 +227,16 @@ export const createComponentWindow = (
browserWindow.show();
});
}
// SDA-4422 workaround
if (!options.frame && options.transparent) {
browserWindow.on('blur', () => {
browserWindow.setBackgroundColor('#00000000');
});
browserWindow.on('focus', () => {
browserWindow.setBackgroundColor('#00000000');
});
}
browserWindow.webContents.once('did-finish-load', () => {
if (!browserWindow || !windowExists(browserWindow)) {
return;