Skip to content

setBounds not working on macos using Window class #23

@KASOGIT

Description

@KASOGIT

My use-case: i have an integer representing the id of the window i wanna share then i use directly new Window(id) and getInfo give me exactly the right window but setBounds not working with this method.

My work around: loop over getWindows and use the window matching the id.

Expected behavior: first method should work directly.

Some code illustrating what i'm saying:

    // first not working method
    const selectedWin = new Window(parsedId);

    // second working workaround
    const selectedWin = windowManager.getWindows().find(window => {
      return window.id === parsedId;
    });

    selectedWin.setBounds({
      x: screenBounds.x + sideBarWidth + 15,
      y: screenBounds.y,
      width: screenBounds.width - sideBarWidth - 15,
      height: screenBounds.height,
    });

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions