Example #1
0
File: winds.ts Project: itchio/itch
  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);
    }
  });
Example #2
0
 watcher.on(actions.windowBoundsChanged, async (store, action) => {
   const { window, bounds } = action.payload;
   if (window === "root") {
     config.set(BOUNDS_CONFIG_KEY, bounds);
   }
 });
Example #3
0
 nativeWindow.on("unmaximize", (e: any) => {
   config.set(MAXIMIZED_CONFIG_KEY, false);
 });