mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-22 20:51:23 +01:00
Save window bounds only if not maximized
This commit is contained in:
parent
8a0f7c6b8f
commit
0cf4f09608
@ -67,8 +67,14 @@ app.on('ready', async () => {
|
||||
mainWindow.loadURL(url);
|
||||
watcher = new Watcher();
|
||||
|
||||
mainWindow.on('resize', () => saveBounds(mainWindow));
|
||||
mainWindow.on('move', () => saveBounds(mainWindow));
|
||||
const handleBoundsChange = () => {
|
||||
if (!mainWindow.isMaximized()) {
|
||||
saveBounds(mainWindow);
|
||||
}
|
||||
};
|
||||
|
||||
mainWindow.on('resize', handleBoundsChange);
|
||||
mainWindow.on('move', handleBoundsChange);
|
||||
|
||||
mainWindow.on('maximize', () => saveMaximized(true));
|
||||
mainWindow.on('unmaximize', () => saveMaximized(false));
|
||||
|
Loading…
Reference in New Issue
Block a user