🐛 Only add a frame on pop-out frames

Signed-off-by: Luka Leer <luka.leer@gmail.com>
This commit is contained in:
Luka Leer 2024-03-14 00:01:06 +01:00
parent c50895837e
commit 837831b6e9
No known key found for this signature in database
GPG Key ID: AA82C4EBCB1682E0
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,10 @@ class BrowserWindow extends electron.BrowserWindow {
this.webContents.setWindowOpenHandler((details) => {
const originalResponse = originalWindowOpenHandler(details);
originalResponse.overrideBrowserWindowOptions.frame = true;
// Only set the frame option if it's a pop-out
if (details.frameName === "DISCORD_CHANNEL_CALL_POPOUT") {
originalResponse.overrideBrowserWindowOptions.frame = true;
}
return originalResponse;
});
});