Windows become untracked after sleep/wake · Issue #589 · acsandmann/rift · GitHub
Skip to content

Windows become untracked after sleep/wake #589

Closed

Description

@tingkai-c

After the Mac sleeps and wakes, ordinary application windows can become untracked by Rift. The windows remain visible and usable in macOS, but disappear from Rift’s managed-window queries and layout. Focusing the affected app does not reliably recover them; restarting Rift restores tracking. The failure has recurred after a restart.

Observed examples include Chrome and Obsidian; this appears to be a general window-tracking problem rather than something specific to those applications.

Reproduction

  1. Run Rift with normal application windows open.
  2. Put the Mac to sleep, then wake it.
  3. Check whether the existing windows are still managed and included in Rift’s window queries.
  4. If a window is missing, focus its application. The affected window can remain untracked until Rift restarts.

This is intermittent. Sleep/wake is the reported trigger; the specific internal notification or state transition responsible has not been isolated.

Expected behavior

Existing windows remain tracked after wake, or Rift rediscovers them when their application/window receives focus.

Diagnostic findings

During a recurrence, native AX and WindowServer inspection still found ordinary standard windows: non-minimized, ordered in, at normal window level, and suitable for management. Rift’s window query returned “Window not found” for one of those native windows, and it was absent from the workspace layout. Activating the app did not restore it.

The reactor has a recovery gap: native focus requests a fresh inventory for an unknown window, but not for a known window whose cached admission state is stale. App activation also does not refresh inventory when the app has no admitted windows. Regression tests reproducing those states fail on current upstream and pass when those recovery paths refresh the inventory.

Environment

  • macOS 26.6 (25G72), Apple Silicon
  • Rift 0.7.0, installed through Homebrew (0.7.0_1)
  • Scrolling layout with virtual workspaces
  • Source investigated: upstream main 250d9923fba57f0122725012733d1e5843448e01

Related: #588 also reports a sleep/wake problem, but describes layout modes resetting. This report concerns windows dropping out of management.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions