mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-22 10:08:55 +00:00
Fix for [Maximize window visual glitch on Windows · Issue #1447 · nativefier/nativefier](https://github.com/nativefier/nativefier/issues/1447) Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
This commit is contained in:
parent
1fd046798d
commit
f046b61a6d
@ -73,7 +73,10 @@ export async function createMainWindow(
|
||||
// Whether the window should always stay on top of other windows. Default is false.
|
||||
alwaysOnTop: options.alwaysOnTop,
|
||||
titleBarStyle: options.titleBarStyle ?? 'default',
|
||||
show: options.tray !== 'start-in-tray',
|
||||
// Maximize window visual glitch on Windows fix
|
||||
// We want a consistent behavior on all OSes, but Windows needs help to not glitch.
|
||||
// So, we manually mainWindow.show() later, see a few lines below
|
||||
show: options.tray !== 'start-in-tray' && process.platform !== 'win32',
|
||||
backgroundColor: options.backgroundColor,
|
||||
...getDefaultWindowOptions(outputOptionsToWindowOptions(options)),
|
||||
});
|
||||
@ -94,6 +97,9 @@ export async function createMainWindow(
|
||||
|
||||
if (options.tray === 'start-in-tray') {
|
||||
mainWindow.hide();
|
||||
} else if (process.platform === 'win32') {
|
||||
// See other "Maximize window visual glitch on Windows fix" comment above.
|
||||
mainWindow.show();
|
||||
}
|
||||
|
||||
const windowOptions = outputOptionsToWindowOptions(options);
|
||||
|
Loading…
Reference in New Issue
Block a user