Repository navigation
Conversation
The monitor.focused handler re-read hl.get_active_workspace(), which can still report the workspace of the monitor the pointer just left, leaving input.follow_mouse one monitor behind: after moving from a floating-mode monitor to a tiled one, hover focus stayed off. The event hands over the monitor, whose own active workspace is already the right one, so the handler now reads that and falls back to the active workspace when no monitor arrives. Fixes omacom#16745
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryThe PR makes pointer focus follow the workspace on the monitor that received focus.
No actionable issues were found. Tests were inspected but not executed.
|
update_input now takes a workspace, and the workspace.active handler passed Hyprland's event workspace straight into it. That workspace is not always the focused one: switching a monitor to an empty workspace with follow_mouse on hit-tests the pointer and can focus a window on another monitor, then still emits workspace.active for the workspace it switched to. Switching to an empty floating workspace that way turned follow_mouse off while a tiled monitor held focus. The handler goes back to reading the focused workspace, as it did before. Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed and verified on a worker VM built from the Omarchy ISO, running Hyprland 0.57.0, with a second headless monitor added so the pointer could move between a tiled monitor and one showing a floating-mode workspace. The bug reproduces, and your fix resolves it. Before your commit, I pushed one fix to your branch (ba8169f). Because Tests: Second opinion: Codex Medium and muse-wonder (via pi, thinking high) reviewed it. Both agreed the Related: #16888 changes the same function for a separate bug (a runtime What it waits on: CI. The |
Fold the additional input handling from omacom#18568 into the older monitor-focus fix. follow_mouse=0 holds pointer events on the focused window; 2 lets an unfocused floating window receive hover and scroll without moving keyboard focus. Disable float_switch_override_focus while floating as well, so arriving from a tiled window does not override that choice, and restore both user settings on tiled workspaces. Co-Authored-By: Random <65575762+rndaom@users.noreply.github.com> Co-Authored-By: GPT-6 in Codex (effort not exposed) <noreply@openai.com>
|
I folded #18568’s additional pointer handling into this branch in I tested this on an Omarchy ISO worker running Hyprland 0.57.2 with a second headless monitor. On the base, the input setting lagged one monitor behind in all three crossings each way, and an unfocused floating terminal received no pointer events. On this head, tiled workspaces got 1/1 and floating workspaces got 2/0; the unfocused terminal received motion and wheel events while keyboard focus stayed on the other window until a click. Restoring the base source reproduced both failures and broke both updated test files; restoring this head passed again.
The first pointer event onto a window touching a monitor edge can still use the previous monitor’s setting, as on the base; this does not change Hyprland’s event ordering. #16888 remains a separate fix for restoring settings changed at runtime. CI is green on this head, and Greptile scored it 5/5 with no findings. This waits on the maintainer to decide whether #18568’s floating-window pointer changes should ship together with the monitor-focus fix or remain separate. |


Fixes #16745
Problem
With window-mode (floating) workspaces in use,
update_input()indefault/hypr/workspace-modes.luasetsinput.follow_mouseto 0 on a floating workspace and restores the user's value on tiled ones. It runs on bothworkspace.activeandmonitor.focused, but onmonitor.focusedit re-readshl.get_active_workspace(), which at that moment can still report the workspace of the monitor the pointer just left. The stale result leavesfollow_mouseone monitor behind: after moving from a floating-mode monitor to a tiled one,follow_mousestays 0 and hovering between tiled windows no longer changes focus until another event fires.Fix
The
monitor.focusedevent passes the monitor it is for (Hyprland'sLuaEventHandler.cppdispatches it with thePHLMONITOR), and a monitor object exposes its ownactive_workspace— already used bydefault/hypr/monitor-workspaces.lua. The handler now passes that monitor's active workspace toupdate_input(), which falls back tohl.get_active_workspace()when no workspace is handed in (theworkspace.activehandler andM.apply()keep the old path).Test
Extended
test/shell.d/hyprland-workspace-layout-test.sh: the stub's active workspace is now mutable, and the new cases fire themonitor.focusedsubscription with a stale active-workspace report while the event's monitor carries a workspace of the opposite mode, in both directions, plus the no-monitor fallback. Without the fix the first new assertion fails (follow_mousestays 0 after focus moves to a tiled monitor); with it the whole file passes. Verified: the test fails on cleanquattrowith the fix stashed and passes with it.