Skip to content

hyprland 0.57.0-3.4: send wl_output's geometry after a rotation - #785

Open
angelrenefm wants to merge 1 commit into
derekross:mainfrom
angelrenefm:hyprland-wl-output-transform
Open

angelrenefm wants to merge 1 commit into
derekross:mainfrom
angelrenefm:hyprland-wl-output-transform

Conversation

@angelrenefm

Copy link
Copy Markdown
Contributor

What and why

On a Pixel 7 turned to landscape, the on-screen keyboard covered the whole screen. Apps that open it at start (Chromium, Messages, Contacts…) were left -18 px tall, so nothing of them showed.

The cause is in Hyprland 0.57, and it is the same one #753 found for the lock screen. A monitor rule that only changes the transform goes through CMonitor::applyMonitorRuleSoft() and emits no modeChanged. CWLOutputResource::updateState() only runs on modeChanged, so clients bound before the turn get a wl_output.done (from xdg-output's update) but no new wl_output.geometry, and keep the old transform. squeekboard binds at login, so it kept believing the screen was in portrait. It sized itself with the vertical formula and our 1.45 vertical scale, and its horizontal scale setting had no effect.

0003-output-send-the-whole-state-with-done.patch makes CWLOutputProtocol::sendDone() send each resource's whole state (scale, mode, geometry with the transform), which ends with the done. That is what updateState() already sent on a mode change, and sending the same values again is allowed by the protocol. The bug is still in Hyprland main (src/protocols/core/Output.cpp).

Tested

On my Pixel 7, with the package built on the phone (makepkg, -j4) and installed with pacman -U, after a logout:

  • A small wl_output client of my own, bound before a quarter turn: before, the turn sent only done, and the transform stayed 0. With the patch, the client gets geometry with transform 1, and 0 on the way back.
  • Chromium in landscape with the keyboard up: before, -18 px tall. With the patch, 107 px at squeekboard's default horizontal scale (1.0). The scale setting works again: 134 px at 0.85, 161 at 0.7.
  • tools/pr-check passes.

Notes

I used AI help (Claude) to work on this.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Ángel. The landscape keyboard covering the whole screen had a satisfyingly small cause: a transform-only rule never runs updateState(), so clients bound before the turn got a done but no new geometry. Sending the whole state with every done fixes it at the one place every turn goes through, and your own client test (transform 1 after the turn, 0 on the way back) is exactly the evidence I'd want.

I checked it against the 0.57.0 release: the sums match and all six patches apply with --fuzz=0, and it stacks with the other three open Hyprland PRs in any order. #753 found the same cause for the lock screen, so the two belong together.

It changes what every client hears after a rotation on every phone, so I'll run it on my Pixel 7 Pro before merging, in one build with #762, #753 and #786. In that order this one goes third, as 0.57.0-3.6 with the patch renamed 0005-…, and #786 after it; I'll renumber both on your branches when I merge, so please don't chase the numbers.

den-kloot added a commit to den-kloot/omarchy-mobile that referenced this pull request Nov 15, 2026
…ekross#785's patch

Review of derekross#753: the AGENTS.md gotcha's last sentence (no rule change applies while the display is off) was only seen in the VM, and says so now. The README's note on dropping 0003 names derekross#785's wl_output patch, the same cause one protocol over, so the two are looked at together once upstream fixes it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A rotation changes the transform but not the mode, so Hyprland sent
wl_output.done without a new wl_output.geometry: clients bound before
the rotation kept the old transform. squeekboard, bound at login, then
sized itself for portrait in landscape and covered the whole screen
(apps that open the keyboard were left -18 px tall on a Pixel 7).

0003 makes every wl_output done carry the whole state (scale, mode,
geometry with the transform), which updateState already sends on a
mode change.

On the Pixel 7: a client bound before a quarter turn now gets geometry
with transform 1, and 0 on the way back (before: done only, transform
stayed 0). Chromium in landscape with the keyboard up is 107 px tall at
squeekboard's default horizontal scale (before: -18), and the
horizontal scale setting takes effect again (134 px at 0.85, 161 at 0.7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@angelrenefm
angelrenefm force-pushed the hyprland-wl-output-transform branch from ff21ac4 to d80a0dc Compare November 15, 2026 13:19
@angelrenefm

Copy link
Copy Markdown
Contributor Author

I've added the Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> trailer that CONTRIBUTING asks for to the
commit (force-pushed; the tree is unchanged).

@derekross

Copy link
Copy Markdown
Owner

Thank you, Ángel, for adding the trailer. The tree is unchanged, so nothing about the review moves. I've now applied this together with the other three open Hyprland changes in every order they could merge, and every order gives the same compositor, so it goes in third as 0.57.0-3.6 with the patch renamed 0005-…, after the combined run on my Pixel 7 Pro. I'll do the renumbering on your branch; nothing more is needed from you.

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