sentialx / node-window-manager

Manage windows in Windows, macOS and Linux using Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

While creating new Window by passing Id crashes the electron app

sameer2248 opened this issue · comments

commented

Bug description

When creating new Window by passing Id crashes the electron app
To Reproduce

Expected behavior

Screenshots

Screenshot 2022-05-24 at 4 49 14 PM

Screenshot 2022-05-24 at 4 50 49 PM

Details:

  • Operating System: Mac os Monterey
  • node-window-manager version: 2.2.4
  • Last known working node-window-manager version: 2.2.4

Additional context

It seems this may be a specific case caused by passing the screen ID of the new Monterey status indicator dot into some TypeScript like:

import { Window } from 'node-window-manager';

const demo = (windowId: string) => {
  const parsedWindowId = parseInt(windowId.split(':')[1], 10);
  const window = new Window(parsedWindowId);
  return window.getBounds();
}
// EDIT: It might also be something else, just not sure - the legacy codebase I'm on can be hard to follow along with

https://www.macrumors.com/how-to/menu-bar-dot-explanation/

Possibly related #55