Skip to content

Include open special workspaces in the screen-recording picker - #11441

Open
Tunahanyrd wants to merge 1 commit into
omacom:quattrofrom
Tunahanyrd:fix/capture-all-visible-displays
Open

Tunahanyrd wants to merge 1 commit into
omacom:quattrofrom
Tunahanyrd:fix/capture-all-visible-displays

Conversation

@Tunahanyrd

@Tunahanyrd Tunahanyrd commented Sep 12, 2026 •

Copy link
Copy Markdown

What changes

The screen-recording region picker omits windows on an open special workspace, including the scratchpad and Quake console. Include each laid-out monitor's open special workspace alongside its active workspace when collecting window rectangles.

Match workspaces by ID when present, falling back to the name for Hyprland 0.57 special workspaces, which have no ID. This keeps compatibility with older negative special-workspace IDs and prevents an inactive normal workspace with a duplicate name from leaking its windows into the picker. Closed special workspaces and hidden group members remain excluded.

#19030 already supplied the multi-monitor behavior. This PR now contains only the remaining special-workspace fix and its regression coverage, rebased onto quattro at c3c8acf1e as one commit. The capture implementation is unchanged from the reviewed 935515ae6; the fixture additionally covers older negative IDs, a closed special workspace and a hidden special-workspace client. Omarchybot's fixes are retained and credited.

Verification

Ran the following against the rebased tree in isolated Bubblewrap sandboxes with networking disabled and the real home directory and desktop session unavailable:

  • bash test/shell.d/capture-picker-binds-test.sh: passed. Covers both special-workspace representations, inactive workspace name collisions, closed special workspaces, hidden clients and the existing unfocused-monitor behavior.
  • Red/green check: the same expanded picker test fails with only bin/omarchy-capture-region replaced by current quattro's version, because the special-workspace rectangles are missing; it passes with the fix.
  • bash test/shell.d/screenrecording-test.sh: passed, 40 checks.
  • bash test/shell.d/screenrecording-process-test.sh: passed, 10 checks.
  • bash test/shell.d/crash-capture-test.sh: passed, 28 checks.
  • bash test/cli: passed, 136 checks. The isolated environment emitted missing theme-directory/fontconfig warnings during safe-dispatch probes; those checks still passed.
  • Bash syntax checks and git diff --check: passed.

Full test/all and a new live desktop interaction were not run during this revision. The existing Hyprland 0.57.2 VM review exercised this same capture implementation: with a scratchpad over an empty workspace, Tab selects its terminal and Enter returns its rectangle; on quattro no window is offered and Enter selects the whole monitor.

Screenshots

Existing before/after evidence from omarchybot's VM review, linked above. These images show the cursor position after Tab; the selected geometry was verified separately in that review.

Before: no scratchpad window is offered.

Before: cursor remains in the top-left corner

After: Tab moves to the scratchpad terminal.

After: cursor moves to the scratchpad terminal

Known limitation

Selection still follows slurp's smallest-rectangle behavior rather than window stacking order. A large scratchpad covering smaller tiled windows can therefore lose selection to the windows underneath. This existing occlusion limitation remains outside this fix; the PR adds the missing candidates without changing selection precedence.

@Tunahanyrd
Tunahanyrd marked this pull request as ready for review September 12, 2026 10:11
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at e4f6d7d, and the bug is real. Reproduced on a disposable Omarchy VM (Hyprland 0.56.2) with a second display added at 1280,0 at scale 2 and a terminal on each display, focus on the first. On quattro, window_rects and monitor_rects offer only the focused display's window and monitor, and four Tab presses under a running slurp never move the cursor off it. On this head, and on this head merged into current quattro, both windows and both displays are offered (1280,0 960x540 at the right logical size), Tab cycles between the two windows across displays, and the fullscreen target is still the focused display. A mirrored display is not listed by hyprctl monitors -j, so it adds no rectangle.

Tests on the same VM: capture-multiple-displays-test.sh passes here and fails with only bin/omarchy-capture-region reverted to quattro's. screenrecording-test.sh, screenshot-sanity-test.sh and crash-capture-test.sh pass. ./test/cli stops at test/cli:616 (the VS Code theme symlink check), and it stops in the same place on quattro, so this PR doesn't cause it, but the suite isn't fully green on the VM.

The diff is about as small as this fix can be, and I found no defects in it. Two things the maintainer should know:

  • Since this was opened, quattro moved screenshots to Omasnap (e265934), so omarchy-capture-region now serves only the screen-recording region picker. The fix still matters there: a bare click on the unfocused display used to record a tiny region and now records that display. The title and description still talk about the screenshot picker.
  • Exclude covered windows from the screen-recording picker #12512 rewrites the same jq filter in window_rects (.visible == true in place of .hidden != true). Whichever lands second has to combine both filters rather than take one side of the conflict.

This review was one model's, Claude Opus 5.5. There was no second opinion: the reviewer, Codex Medium, answers, but today's review budget was spent before this item. That review is still owed before this can be marked ready. Labelled verified on the reproduction. Waiting on the second opinion and then the maintainer; nothing is needed from the author.

@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review labels Nov 16, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

@Tunahanyrd, this conflicted with quattro after #19030 merged. That pull request already offers every monitor's active workspace and rectangle to the picker, which was most of what this one did. I've merged quattro into your branch and kept what #19030 doesn't cover: windows on a monitor's open special workspace (the scratchpad on Super+S, the Quake console on Super+grave), which the picker never offers on quattro.

What I changed on your branch:

  • The conflict, resolved to Snap a bare capture click on any monitor, not only the focused one #19030's visible_workspaces and mirror filter, with the open special workspace added (2267282).
  • The special-workspace match never fired on current Hyprland. On Hyprland 0.57.2 a special workspace has no id: hyprctl monitors -j reports specialWorkspace as {"address":"special:scratchpad","type":"special","name":"special:scratchpad"}, and its windows' workspace has the same shape. Matching .specialWorkspace.id therefore picked up nothing. Workspaces are now keyed by .id // .name, so normal workspaces still match by id as on quattro, and special ones match by id on older Hyprland and by name on 0.57 (4e10d99, e3a5d1f, 935515a). Names alone weren't enough, because Hyprland lets two workspaces share a name, so a hidden workspace renamed to match a visible one would have leaked its windows into the picker.
  • Tests: capture-multiple-displays-test.sh mostly repeated what Snap a bare capture click on any monitor, not only the focused one #19030 added to capture-picker-binds-test.sh, so its special-workspace case moved into that file's fixture, as the testing guide asks (18d9dbe). The fixture's hidden workspace now shares a visible workspace's name too, to cover the rename case.

Checked on a disposable Omarchy VM (Hyprland 0.57.2), with the scratchpad open over an otherwise empty workspace and one terminal on it. The before and after below are cropped to that display:

  • On quattro, and with your original id match, Tab finds no window and leaves the cursor in the corner (3, 3). Enter takes the whole monitor, 0,0 1280x800.
  • On this head, Tab moves to the scratchpad terminal (640, 413) and Enter takes it, 12,38 1256x750. A plain window on a normal workspace is still offered.
  • capture-picker-binds-test.sh passes on this head. It fails with bin/omarchy-capture-region reverted to quattro's, and with the original id match. ./test/cli passes in full (136 checks). screenrecording-test.sh, screenrecording-process-test.sh and crash-capture-test.sh pass.

Before, on quattro: Tab leaves the cursor in the top-left corner because no window is offered
After, on this branch: Tab puts the cursor in the middle of the scratchpad terminal

The screenshots show where the cursor landed, not slurp's highlight. What was picked is the geometry listed above.

The second opinion was Codex Medium and muse-wonder (via pi, thinking high), over two rounds. Codex found the name-collision problem, which e3a5d1f fixes. The second round, on that fix, came back clean from both. The last commit only changes a comment, and the picker test was re-run on it. Both models agreed that the special-workspace part is what's left worth keeping after #19030; that agreement came after my own reading, and their independence isn't guaranteed.

One limit for the maintainer. muse-wonder raised it and I agree with it: the picker and slurp both pick the smallest rectangle under the cursor. A full-size scratchpad window over a workspace with tiled windows still loses to the smaller windows underneath, both on hover and for Tab. The Quake console's smaller panel, and a scratchpad over an empty workspace, work. This is no worse than on quattro. Fixing it would mean giving special workspaces precedence over the windows they cover, which is a design choice and isn't in this pull request.

Waiting on you: the title and description still describe the all-displays change and say draft. Could you update them to describe the special-workspace fix? After that it goes to the maintainer.

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No new blocking issue was found in the reviewed changes.

Summary

The picker now includes windows from open special workspaces alongside windows from each display’s active workspace.

  • The capture picker includes windows from open special workspaces.

Reviews (2) · Last reviewed commit: "Include open special workspaces in the c..." · Reviewed by Greptile

Key visible workspaces by id, falling back to names for special workspaces on Hyprland 0.57. Preserve multi-monitor selection and exclude inactive workspaces with colliding names.

Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
@Tunahanyrd
Tunahanyrd force-pushed the fix/capture-all-visible-displays branch from 935515a to 686f733 Compare November 17, 2026 09:31
@Tunahanyrd Tunahanyrd changed the title Include windows from all visible displays in screenshot picker Include open special workspaces in the screen-recording picker Nov 17, 2026
@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Read the revised description, the diff at 686f733ff8df0d436eb62598a8f280ee039da076, and the expanded picker fixture. The title and description now address the previous review request, and the capture implementation is unchanged from the earlier VM-reviewed revision.

Classification is unsettled: GPT-6 in Codex (high effort) calls omitting a visible scratchpad window from the picker a bug; the configured classifier, DeepSeek v4p1 Flash via pi (effort unspecified), returned enhancement for this revision. The queue requires agreement before proceeding, so this is waiting on the maintainer to resolve that classification. No tests were rerun on this head, and no new verification or readiness labels were added.

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