Skip to content

feat(overview): show windows from all monitors#85

Open
enhulsman wants to merge 3 commits intoAxenide:mainfrom
enhulsman:feat/cross-monitor-windows
Open

feat(overview): show windows from all monitors#85
enhulsman wants to merge 3 commits intoAxenide:mainfrom
enhulsman:feat/cross-monitor-windows

Conversation

@enhulsman
Copy link

Prerequisites

Depends on #83 (fix/overview-decouple-dispatch) — please merge that first. This PR builds on the local workspace tracking it introduces. Removing the monitor filter means the overview shows windows across all monitors, and that needs the trackedWorkspaceId infrastructure for correct workspace group filtering during navigation.

Note: the diff currently includes #83's changes since both target main. Once that merges, the diff will update to show only this PR's changes.

Problem

I run a dual-monitor setup (1080p + ultrawide) and noticed the overview only shows windows from the current monitor. If I have a browser on my ultrawide and a terminal on my main screen, opening the overview on either one only shows half my windows. I'd have to remember which screen something is on to find it, which kind of defeats the point of having an overview.

The window list is just filtered by monitor ID, so each screen's overview only shows its own windows.

Solution

Remove the monitor filter from the window list in both Overview.qml (grid layout) and ScrollingWorkspace.qml (scrolling layout).

Since monitors can have different resolutions, cross-monitor windows need scale correction:

  • Look up each window's actual monitor resolution and scale factor
  • Compute crossScaleUniform = min(overviewWidth/windowMonWidth, overviewHeight/windowMonHeight)
  • Apply uniform scaling to preserve aspect ratio (important for ScreencopyView letterboxing)
  • Center along the less-constrained axis

Same-monitor windows get scale 1.0 — single-monitor users won't notice any difference.

Other things I fixed along the way

  • Workspace tiles now have a Colors.background fill to prevent white bleed-through on cross-monitor tiles
  • focusedWorkspaceIndicator gets z: 10 so it renders above window previews
  • monitors list is threaded into ScrollingWorkspace for the scrolling layout
  • Window corner icon now scales with window size (12% of min dimension, floor 12px)

Files Changed

  • modules/widgets/overview/Overview.qml: remove monitor filter, cross-scale per window, z-order fix, background fill
  • modules/widgets/overview/OverviewWindow.qml: crossScaleX/crossScaleY properties, dynamic badge
  • modules/widgets/overview/ScrollingOverview.qml: pass monitors to delegate
  • modules/widgets/overview/ScrollingWorkspace.qml: remove filter, cross-scale positioning

Testing

  1. Single monitor: overview identical to before
  2. Two monitors, same resolution: windows from both monitors appear correctly
  3. Two monitors, different resolutions: cross-monitor windows scaled proportionally
  4. Scrolling layout: repeat tests above
  5. Click-to-focus on cross-monitor window navigates correctly
  6. Window corner badges scale appropriately with window preview size

Introduce local workspace tracking (trackedWorkspaceId) so Tab/arrow
key navigation, window clicks, and Enter-with-empty-search no longer
dispatch Hyprland IPC commands while the focus grab is active. This
prevents the overview from closing itself mid-interaction due to
IPC-triggered onCleared events.

Changes:
- Tab/Shift-Tab/Arrow keys update trackedWorkspaceId locally
- Enter with empty search closes overview, then dispatches workspace
- Single-click on window emits workspaceNavigated signal (no dispatch)
- Double-click on window closes overview first, then focuses
- Remove focuswindow dispatch on hover (prevents cursor warping)
- Add "workspace" to HyprlandData IPC ignore list
- Dynamic badge sizing (12% of min dimension, floor 12px)
- Workspace tile background color prevents white bleed-through
- focusedWorkspaceIndicator z:10 for correct render order
Animate border.color instead of border.width on hover.
The width 0→2 animation caused geometry changes that
produced a brief visual glitch on the screencopy preview.
Remove the monitor filter from both grid and scrolling overview layouts
so windows from all monitors are visible in each screen's overview.

Cross-monitor windows are scaled proportionally using uniform scaling
to preserve aspect ratio within ScreencopyView letterboxing. Same-
monitor windows get scale 1.0 (behavior identical to before).

Changes:
- Remove monitor filter from filteredWindowData (grid) and
  workspaceWindows (scrolling)
- Add per-window crossScaleX/Y/Uniform and centering offsets
- Look up each window's actual monitor for position calculation
- Add solid background fill to prevent white bleed-through
- Pass monitors list to ScrollingWorkspace delegate
- Fix contentBounds to use crossScaleUniform for position
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