Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/layout_engine/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,12 @@ impl LayoutEngine {
if let Some(prev_wid) = previous_selection {
let _ = self.workspace_tree_mut(ws_id).select_window(layout, prev_wid);
}
// In scrolling layout, don't jump to adjacent displays at the
// boundary. Off-screen columns are intentionally hidden, so
// cross-display focus here would select a hidden window.
if matches!(self.workspace_tree(ws_id), LayoutSystemKind::Scrolling(_)) {
return EventResponse::default();
}
if let Some(new_space) = self.next_space_for_direction(
space,
direction,
Expand Down
14 changes: 13 additions & 1 deletion src/layout_engine/systems/scrolling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,19 @@ impl LayoutSystem for ScrollingLayoutSystem {
.copied()
.unwrap_or((tiling.size.width * ratio).max(1.0));
let start = column_starts.get(col_idx).copied().unwrap_or(0.0);
let x = anchor_x + start - offset;
let mut x = anchor_x + start - offset;
// Hide off-screen columns by clamping them to 1px visible at the
// screen edge. This prevents cross-app Z-order issues since
// macOS can't reorder other apps' windows via SLSOrderWindow.
let visible_left = tiling.origin.x;
let visible_right = tiling.origin.x + tiling.size.width;
if x + column_width <= visible_left {
// Column is fully off-screen left: hide just past the edge
x = visible_left - column_width;
} else if x >= visible_right {
// Column is fully off-screen right: hide just past the edge
x = visible_right;
}
if col.windows.is_empty() {
continue;
}
Expand Down
Loading