Skip to content

Reclaim workspaces left without a monitor - #20185

Merged
dhh merged 2 commits into
quattrofrom
fix/issue-20156
Nov 25, 2026
Merged

dhh merged 2 commits into
quattrofrom
fix/issue-20156

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

reclaim() skips an existing workspace when Hyprland has left it without a monitor. The following focus dispatch then fails with Workspace has no monitor, so Super+N cannot reach its windows. Move that workspace onto the requested monitor before focusing it, and settle the previous monitor only when one exists. Window-to-workspace bindings use the same recovery path. Recovery applies to workspace IDs in the requested monitor's own block; assigning orphans from a disconnected monitor's block remains unchanged.

The regression case covers both focusing an occupied monitorless workspace and moving a window into one. On an Omarchy worker running Hyprland 0.57.2, clearing workspace 2's actual monitor reference with a temporary test plugin makes the base dispatch fail; this change restores the workspace and its window, and reverting it restores the failure. This seeds the reported monitor ? state; disabling a virtual output did not produce it, and the Framework laptop's lid-close sequence on Hyprland 0.56.2 still needs the reporter's confirmation.

Fixes #20156.

Screenshots

Controlled worker test with an occupied workspace whose monitor reference was deliberately cleared; these captures demonstrate recovery from that state, not reproduction of the physical display failure.

Before: the base dispatch leaves workspace 1 visible because workspace 2 has no monitor

After: the same dispatch reaches workspace 2 and its existing window after reclaiming it

omarchybot and others added 2 commits November 25, 2026 20:03
A workspace can survive with no monitor after a display is disabled. Reclaim it before focusing or moving a window there; only settle a previous monitor when there was one.

Co-Authored-By: Codex GPT-6 (reasoning effort not exposed) <noreply@openai.com>
Make an unreclaimed workspace fail with the compositor's focus error instead of a nil dereference, so the recovery regression explains the failed operation.

Co-Authored-By: Codex GPT-6 (reasoning effort not exposed) <noreply@openai.com>
Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

reclaim now moves an existing monitorless workspace onto the requested monitor before the caller focuses it or moves a window into it.

  • Workspace actions bring monitorless destinations back onto the requested screen.

Reviews (1) · Last reviewed commit: "Report monitorless workspace rejection i..." · Reviewed by Greptile

@dhh
dhh merged commit 2dfb187 into quattro Nov 25, 2026
5 checks passed
@dhh
dhh deleted the fix/issue-20156 branch November 25, 2026 21:35
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 25, 2026
* Reclaim workspaces left without a monitor

A workspace can survive with no monitor after a display is disabled. Reclaim it before focusing or moving a window there; only settle a previous monitor when there was one.

Co-Authored-By: Codex GPT-6 (reasoning effort not exposed) <noreply@openai.com>

* Report monitorless workspace rejection in the workspace model

Make an unreclaimed workspace fail with the compositor's focus error instead of a nil dereference, so the recovery regression explains the failed operation.

Co-Authored-By: Codex GPT-6 (reasoning effort not exposed) <noreply@openai.com>
Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>

---------

Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
Co-authored-by: Codex GPT-6 (reasoning effort not exposed) <noreply@openai.com>
Co-authored-by: Opus 5.5 High <noreply@anthropic.com>
@emirb emirb added this to the 4.6.0 milestone Dec 1, 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

3 participants