Skip to content

Let clicks reach a window drawn over a maximized one on floating workspaces - #17360

Open
rndaom wants to merge 6 commits into
omacom:quattrofrom
rndaom:split/floating-clicks-fix
Open

rndaom wants to merge 6 commits into
omacom:quattrofrom
rndaom:split/floating-clicks-fix

Conversation

@rndaom

@rndaom rndaom commented Nov 2, 2026 •

Copy link
Copy Markdown

On a floating workspace, clicks could go straight through a window to a maximized one under it. Maximize Claude, bring Chrome up from the dock at its own size over it, then click Claude: Claude takes focus but Chrome stays drawn on top. From then on every click on Chrome, its titlebar buttons included, lands on Claude instead.

Hyprland draws a maximized window under every floating window it lets over it (allowed_over_fullscreen), whatever their stacking order, but hands a click to whichever window is highest in that order. Anything that raises the maximized window, a click on it or an app asking for focus, leaves it above windows that are still drawn over it, so what is on screen and what takes the click no longer match.

  • The order is kept to what is on screen. Before Hyprland picks the window under a click (a non-consuming bind on the mouse buttons), the windows drawn over a maximized one are put back above it in their own order. Clicks go to what is on screen; nothing new is raised or hidden.
  • Only a maximized window is handled. A true fullscreen window (Super + F) keeps the screen to itself and its stacking is left as it is, as in Bring a maximized window back maximized on floating workspaces #16497. Pinned windows and tiled workspaces are left alone too.

This is the bug fix from #16545 on its own. The behaviour change that brings a clicked maximized window to the front is in #17361, stacked on this one.

Related work:

Testing:

  • A new case in test/shell.d/hyprland-workspace-layout-test.sh: a click on a window drawn over a maximized one reaches it, after the maximized window was clicked, after it asked for focus, and with the click watcher non-consuming. It fails without the change. A further assert, that a click on a true fullscreen window leaves the windows over it alone, fails when the check matches any fullscreen state. The floating workspaces test's Hyprland mock gains an hl.bind stub.
  • hyprland-workspace-layout-test.sh and hyprland-floating-workspaces-test.sh pass on this branch.

Fixes #17724

…spaces

Hyprland draws a maximized window under every floating window it lets over
it, whatever their order, but hands a click to the highest in that order.
Once the maximized window was raised, by a click on it or an app asking
for focus, a window still drawn over it passed every click, its titlebar
buttons included, through to the maximized window.

Before Hyprland picks the window under a click, the windows drawn over a
maximized one are now put back above it, so a click goes to what is on
screen. A true fullscreen window keeps the screen to itself and is left
alone.
@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no actionable new issue was established.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issue was established.

Summary

Keeps clicks aligned with windows drawn over a maximized window on floating workspaces.

  • Clicks reach floating windows drawn over maximized windows.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Mouse button pressed] --> B[Find maximized windows on floating workspaces]
  B --> C{Any overlaid windows below them in click order?}
  C -->|Yes| D[Raise overlaid windows in their existing order]
  C -->|No| E[Leave order unchanged]
  D --> F[Let Hyprland deliver the click]
  E --> F
Loading

Reviews (6) · Last reviewed commit: "Merge remote-tracking branch 'origin/qua..." · Reviewed by Greptile

@hausky

hausky commented Nov 17, 2026

Copy link
Copy Markdown

I reproduced the click-through on Omarchy 4.5.0-3 with Hyprland 0.56.2-4, using two Foot windows on a floating workspace.

  1. Maximize window A.
  2. Focus and raise window B above it. B is visible and receives clicks.
  3. Focus and raise A again. B stays visible above A.
  4. Left-click inside the visible part of B.

The Wayland pointer logs showed the button press arriving at A, with no button press delivered to B. I then exercised this PR's restacking operation in the live session with alter_zorder({ mode = "top", window = B }) before clicking at the same coordinates. B remained visible and received the button press. A stayed maximized.

On the PR branch at bb017a5, the workspace layout tests passed (15 cases), including the click-through regression, and the floating workspace tests passed (44 cases).

@omarchybot

Copy link
Copy Markdown
Collaborator

Codex High read the diff at bb017a5540b42eb5b9fe845698e3bb8b54471984, the surrounding workspace-mode code, the base branch’s rules, and the linked report. I classified this as a bug, but the second classifier (deepseek-v4p1-flash) returned no usable classification, so that step remains unsettled.

Runtime verification has not run, and no verification labels were applied. The unused worker was destroyed. No author action is requested; this waits on the maintainer to resolve the classification blocker.

@omarchybot omarchybot added the bug Something isn't working label Nov 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed by GPT-6 in Codex (effort not exposed), with Opus 5.5 High and muse-wonder via pi, thinking high. This overlaps #16404’s maximized-window handling: that older patch lowers other windows when focus changes; this one repairs click order before the button press. The reviewers differed on whether the remaining click-routing case warrants a separate patch. I handed that case to #16404’s review; #18330 also covers the ordinary-window focus-without-raise path. This stays open for the maintainer to decide how these fixes should compose. The reviewers’ independence is not guaranteed.

On a disposable ISO worker running Hyprland 0.57.2, the head’s CLI checks passed (129), workspace-layout tests passed (15), and floating-workspace tests passed (44). The latter initially stopped because Node was absent from the SSH PATH, then passed using the worker’s existing installation. I stopped further verification after the comparison: no live pointer-click reproduction, base/reverted comparison or screenshots were completed, so no verification labels were added. The worker was destroyed.

GitHub currently lists #16241 as an issue this PR would close, although this change excludes true fullscreen. Please rephrase “does not fix #16241” to avoid the closing keyword, for example “The true-fullscreen case in #16241 is outside this change’s scope.” No commits were pushed.

omarchybot added a commit to hari45wavin/omarchy that referenced this pull request Nov 22, 2026
Focusing an ordinary floating window sets allowedOverFullscreen without raising its input target. After the fullscreen or maximized window was raised, the visible overlay therefore passes its first click underneath. Raise that overlay when focus changes, retaining the fullscreen window's sibling lowering and pointer focus restoration. Restrict the repair to floating workspaces that contain a fullscreen or maximized window.

Carries the residual click-routing case from omacom#17360 into omacom#16404, using focus-time raising rather than its mouse bind: a live worker click still reached the old surface when the bind repaired the stack. omacom#18330 describes the broader focus-without-raise case; this change covers only the fullscreen interaction here. The regression fails when this source change is reverted.

Co-Authored-By: Random <65575762+rndaom@users.noreply.github.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

The focus-without-raise case handed over in the previous review is now implemented in #16404 by cb40f714a641ea16f2f65cb97bea5110a6d88110, which credits Random (@rndaom) as co-author. I compared this unchanged head (bb017a5540b42eb5b9fe845698e3bb8b54471984) with the current overlapping fixes. These remain different approaches: this PR preserves the visible overlays and repairs their click order, while #16404 lowers overlays when the maximized window gains focus and raises an ordinary overlay when it gains focus.

GPT-6 in Codex (effort not exposed), Opus 5.5 High, and muse-wonder via pi, thinking high checked the comparison. Both second-opinion reviewers gave the older #16404 precedence for the shared focus paths; they differed on whether the pre-click repair still covers an additional case. No additional case was runtime-verified in this comparison, and the reviewers’ independence is not guaranteed. No further fold was queued because the previously handed-over case is already present.

No commits were pushed or tests rerun, and no verification labels were added. This stays open for the maintainer to decide how the overlapping fixes should compose.

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (effort not exposed) checked the updated head 04df8578660a904097ae148b6344d96eab65f2d4, its merge from quattro, the surrounding workspace code, and the current overlapping fixes. The pre-click restacking logic is unchanged by the merge. The description now correctly excludes #16241 from its closing references and links #17724.

This remains a different approach from #16404: it preserves visible overlays and repairs their click order, while #16404 lowers siblings when a maximized window gains focus and raises an ordinary overlay when it gains focus. The required second-opinion review could not run: Opus 5.5 High reached its usage limit, and omabot review --ping confirmed it could not answer. No second opinion of this revision was completed, so this review makes no new choice between the competing fixes.

No tests were run or commits pushed in this review, and no verification labels were added. The updated head has not been runtime-verified here. This stays open for the maintainer's decision about the overlapping fixes and a completed second opinion; no author action is requested.

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (effort not exposed) rechecked 9f73cd624c671551f41255664d96f00dd4d05420, the current overlapping patches, and the linked report. The fix and its tests are unchanged by this merge from quattro. The second-opinion comparison completed: Opus 5.5 High and muse-wonder via pi, thinking high agreed on the shared coverage with #16404 and found no verified code defect in this patch. Their independence is not guaranteed.

The overlap remains for the maintainer to decide: this patch preserves visible overlays, while #16404 lowers them when a maximized window gains focus. No further runtime verification was done after the comparison; this head has no worker reproduction from this review. No commits were pushed or verification labels added. No author action is requested.

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (effort not exposed) checked e99097ed8c4f0583638199492a545484839238f2, its merge from quattro, the surrounding workspace and input code, and the current overlapping fixes. The fix and tests are unchanged by the merge. Opus 5.5 High and muse-wonder via pi, thinking high reviewed the comparison. Both gave older #16404 precedence for the shared focus paths; they disagreed about a remaining pre-click case, and no new reachable case missed by #16404 was verified. Their independence is not guaranteed.

This remains a maintainer decision about how the overlapping fixes compose: this patch preserves visible overlays, while #16404 lowers them when a maximized window gains focus. No new code defect was verified in this patch. No worker tests or captures were run for this head after the comparison, no commits were pushed, and no verification labels were added. No author action is requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Floating workspace: mouse clicks on floating windows that overlap a maximized window pass through to the maximized window

3 participants