watcher.on(actions.windBoundsChanged, async (store, action) => { const { wind, bounds } = action.payload; const nativeWindow = getNativeWindow(store.getState(), wind); if (nativeWindow.isMaximized()) { // don't store bounds when maximized return; } if (wind === "root") { config.set(BOUNDS_CONFIG_KEY, bounds); } else { const props = store.getState().winds[wind].properties; const { initialURL } = props; const configKey = `${initialURL}-bounds`; config.set(configKey, bounds); } });
watcher.on(actions.windowBoundsChanged, async (store, action) => { const { window, bounds } = action.payload; if (window === "root") { config.set(BOUNDS_CONFIG_KEY, bounds); } });
nativeWindow.on("unmaximize", (e: any) => { config.set(MAXIMIZED_CONFIG_KEY, false); });