Skip to content

Feat/multidisplayv2 sjpatches - #605

Merged
acsandmann merged 9 commits into
acsandmann:feat/multidisplayv2from
sj-cstar:feat/multidisplayv2-sjpatches
Oct 22, 2026
Merged

acsandmann merged 9 commits into
acsandmann:feat/multidisplayv2from
sj-cstar:feat/multidisplayv2-sjpatches

Conversation

@sj-cstar

Copy link
Copy Markdown
Contributor

sj-cstar and others added 9 commits October 22, 2026 12:47
Rift hides the windows of inactive workspaces by parking them past the
bottom-left or bottom-right corner of their display, leaving a sliver on
screen. With a display arranged above another, a window parked past the
upper display's bottom edge sits on the lower display. Rift then adopts it
there, and it turns up in the wrong display's workspace.

- add right-edge and left-edge placements, top-aligned with the display
  and clamped to its height
- pick the placement that overlaps other displays least
- treat a sliver in either dimension as hidden

🤖 Generated with Claude Code
After move-node carried the focused window onto another display, the
next command still acted on the display the window had left: macOS
moves its active display along with the key window only later. Make the
window's new display the command context, as focus_display would, so a
second move-node or a focus command acts where the window now is.

🤖 Generated with Claude Code
An app actor gives up when registering for an app's accessibility
notifications fails, and nothing tries again until the app relaunches or
opens a new window, so its windows stay unmanaged. Registration had no
grace period outside JetBrains IDEs and Emacs.

- give every app a two second grace period for the first registration
- retry attaching whenever the user activates an app that has no app
  actor

🤖 Generated with Claude Code
move_window_to_workspace with a window id only searched the workspaces of
the display holding the command context. A window on another display was
not found, so the command did nothing while rift-cli still reported
success. Fall back to the window's assignment in any workspace; the rest
of the command already works out the window's own display.

🤖 Generated with Claude Code
A new window opens wherever macOS and the app put it. Launchers and
hotkeys often activate an app before asking it for a window, so the new
window lands next to the app's other windows, on whichever display those
are on, and joins that display's visible workspace instead of the one the
user works in. Keyboard focus has moved with the activation by then; the
pointer has not, and with mouse_follows_focus it also follows keyboard
moves.

In shared mode, move a new standard window to the display under the
pointer when macOS put it on another one, through the same transfer as
move_window_to_display. A window whose app rule names a workspace stays
where the rule puts it. Independent mode is unchanged.

🤖 Generated with Claude Code
…display

In shared mode, move_workspace_to_display moved a workspace whose rule
binds it to a connected display, and the move held until the next display
change. reconcile_workspace_placements then put it back on the rule's
display: after sleep and wake, plugging a display or a desktop switch,
the workspace jumped back with its windows.

Refuse the move while the rule's display is connected, and log why. An
unbound workspace still moves, and so does a bound one while its display
is away.

🤖 Generated with Claude Code
…queries

In shared mode an unscoped workspace query returns the whole catalog, with
one is_active workspace per display and nothing saying which display each
belongs to. Clients that pick the active workspace, such as status bars
selecting .is_active, got one name per display and could not tell which
one has focus.

Add display_uuid, the display a workspace belongs to, and is_focused,
true for the workspace active on the display holding command focus. Both
default when absent, so older clients and servers still decode.

🤖 Generated with Claude Code
A workspace rule's display only applies with display_mode = "shared";
in independent mode rift dropped it without a word. And a rule naming a
display by name matched the first of several identical monitors.

Log a warning for each display rule outside shared mode when the settings
load, and when a rule's display name matches more than one connected
display. Neither is a validation error: switching display_mode in the
settings UI must not be refused because rules still name displays.

🤖 Generated with Claude Code
Keep every fix but trim the diff: side-edge parking reuses the corner
geometry, the ignored display rule warning lives in one place, the
pointer-display and move-node helpers are condensed, and the tests are
merged into a smaller set that each fail without their fix.
@acsandmann
acsandmann merged commit 2826357 into acsandmann:feat/multidisplayv2 Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants