Skip to content

OpenStation can focus a window that is hidden on another desktop #557

Description

@nickhamze

OpenStation's public window-manager path can focus a window on another virtual desktop without showing it. The visible desktop loses its focused state, but the newly “focused” window is still hidden and has a 0×0 rectangle.

How to reproduce

  1. Keep Desktop 1 active.

  2. Put a minimized Pages window on Desktop 2.

  3. From Desktop 1, use the exposed manager path:

    const pages = wp.os.windowManager.getById("pages");
    wp.os.windowManager.focus(pages);
    pages.restore();
  4. Inspect the active desktop and focused window.

What should happen

OpenStation should switch to Desktop 2 and reveal Pages, move Pages to the active desktop, or refuse to focus a window it cannot display.

What happens instead

Pages becomes the logical focused window while Desktop 1 stays active. Pages remains display: none with no visible geometry, and the windows the user can see no longer look focused.

The ordinary Pages launcher did not reproduce this because it opens a visible Pages window on the active desktop. The problem is limited to callers using the exposed focus/restore path directly.

Where to look

  • src/window-manager/index.ts
  • src/window-manager/desktops.ts
  • src/window/index.ts

The manager should never leave focus on an invisible cross-desktop target. Focusing one should include the desktop transition or fail without disturbing the visible workspace.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions