node-window-manager icon indicating copy to clipboard operation
node-window-manager copied to clipboard

While creating new Window by passing Id crashes the electron app

Open sameer2248 opened this issue 3 years ago • 1 comments

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

sameer2248 avatar May 27 '22 10:05 sameer2248

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

pzrq avatar May 31 '22 23:05 pzrq