Skip to content

Hide off-screen scrolling columns and stop boundary focus jumps#320

Open
corpooo wants to merge 2 commits intoacsandmann:mainfrom
corpooo:pr/hide-offscreen-columns
Open

Hide off-screen scrolling columns and stop boundary focus jumps#320
corpooo wants to merge 2 commits intoacsandmann:mainfrom
corpooo:pr/hide-offscreen-columns

Conversation

@corpooo
Copy link
Copy Markdown
Contributor

@corpooo corpooo commented Mar 27, 2026

Summary

  • clamp fully off-screen scrolling columns to the screen edge instead of leaving them far outside the visible strip
  • prevent cross-display focus jumps when scrolling-layout focus hits the left/right boundary

Why

The scrolling layout can produce windows that are logically part of the strip but fully outside the visible area. When those windows belong to other apps, macOS window ordering becomes unreliable during focus changes and can cause overlap/flicker problems.

This takes the simpler route: if a scrolling column is fully off-screen, place it just beyond the visible edge so it stays hidden without requiring cross-app window reordering.

The follow-up boundary guard keeps focus-left / focus-right from jumping to an adjacent display when scrolling layout is already at the first or last visible column. With off-screen columns hidden, that jump can otherwise select a hidden window and desynchronize focus.

Verification

  • cargo build --profile release-fast --bin rift
  • cargo test scrolling -- --nocapture

corpooo and others added 2 commits March 27, 2026 07:19
macOS does not allow non-privileged apps to reorder other apps' windows
(SLSOrderWindow returns CGError 1000 on Tahoe). Instead of fighting
macOS Z-order, hide off-screen columns by clamping them just past the
screen edge. This eliminates cross-app overlap entirely.

Removes the broken SLSOrderWindow-based Z-order enforcement since it
cannot work without SIP-disabled Dock injection (like yabai).

Inspired by OmniWM's approach of moving non-visible columns off-screen.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant