Hyprland 0.56.2 window.float ignores action=set/unset and toggles #91

Open
opened 2026-10-11 13:22:38 +08:00 by Breadway · 1 comment
Owner

Found with a disposable Kitty in ECO-71's private headless Hyprland. Confidence: high, measured after each dispatch. hl.dispatch(hl.dsp.window.float({action='set',window='address:...'})) toggles false -> true, then a second identical call toggles true -> false. Repeating action='unset' also toggles. Each call returns ok. The installed ~/.config/hypr/hyprland-api.lua documents set/unset, and current upstream wiki also documents those actions, so code trusting them silently loses idempotence. Audit BOS callers that assume action is honored. bread-session mitigates by querying actual state, toggling only on a mismatch, and verifying the result. Reproduction changes only an isolated test window, never the live desktop.

Found with a disposable Kitty in ECO-71's private headless Hyprland. Confidence: high, measured after each dispatch. `hl.dispatch(hl.dsp.window.float({action='set',window='address:...'}))` toggles false -> true, then a second identical call toggles true -> false. Repeating action='unset' also toggles. Each call returns `ok`. The installed ~/.config/hypr/hyprland-api.lua documents set/unset, and current upstream wiki also documents those actions, so code trusting them silently loses idempotence. Audit BOS callers that assume action is honored. bread-session mitigates by querying actual state, toggling only on a mismatch, and verifying the result. Reproduction changes only an isolated test window, never the live desktop.
Author
Owner

Investigation (no code change in Breadway/bos).

Upstream source (hyprwm/Hyprland main, src/config/lua/bindings/LuaBindingsInternal.cpp, parseToggleStr): accepts only "" or "toggle" -> toggle, "enable"/"on" -> enable, "disable"/"off" -> disable. Any other string, including "set" and "unset", falls through to TOGGLE. That matches the card's measured toggling. The working Lua form is action = "enable" / "disable" (or "on"/"off"). Caveat: I read main, not the 0.56.2 tag, and did not confirm against 0.56.2 on a live compositor.

Repo audit: the only window.float caller in Breadway/bos skel is scripts/input/keybinds.lua:69 with action = "toggle", which is correct. No set/unset caller exists in iso/ or scripts/, so nothing in this repo relies on the broken actions. Static window_rule float = true (hyprland.lua:63-64) is unaffected.

Where the fix belongs: bread-session (ECO-71 side) is the caller that the card says assumes action is honoured. Its set/unset calls should move to enable/disable, or keep the query-then-toggle mitigation. That repo is not in this task. Returning this card to todo since no change is needed here.

Investigation (no code change in Breadway/bos). Upstream source (hyprwm/Hyprland main, src/config/lua/bindings/LuaBindingsInternal.cpp, parseToggleStr): accepts only "" or "toggle" -> toggle, "enable"/"on" -> enable, "disable"/"off" -> disable. Any other string, including "set" and "unset", falls through to TOGGLE. That matches the card's measured toggling. The working Lua form is action = "enable" / "disable" (or "on"/"off"). Caveat: I read main, not the 0.56.2 tag, and did not confirm against 0.56.2 on a live compositor. Repo audit: the only window.float caller in Breadway/bos skel is scripts/input/keybinds.lua:69 with action = "toggle", which is correct. No set/unset caller exists in iso/ or scripts/, so nothing in this repo relies on the broken actions. Static window_rule float = true (hyprland.lua:63-64) is unaffected. Where the fix belongs: bread-session (ECO-71 side) is the caller that the card says assumes action is honoured. Its set/unset calls should move to enable/disable, or keep the query-then-toggle mitigation. That repo is not in this task. Returning this card to todo since no change is needed here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bos#91
No description provided.