From d80a0dcb7200622ead929e0b37d947a142cdce23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Sat, 14 Nov 2026 22:31:57 +0100 Subject: [PATCH] hyprland 0.57.0-3.4: send wl_output's geometry after a rotation 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 --- ...utput-send-the-whole-state-with-done.patch | 16 ++++++++++++++++ packages/hyprland/PKGBUILD | 19 +++++++++++++++---- packages/hyprland/README.md | 14 +++++++++++++- 3 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 packages/hyprland/0003-output-send-the-whole-state-with-done.patch diff --git a/packages/hyprland/0003-output-send-the-whole-state-with-done.patch b/packages/hyprland/0003-output-send-the-whole-state-with-done.patch new file mode 100644 index 000000000..0e310d4d6 --- /dev/null +++ b/packages/hyprland/0003-output-send-the-whole-state-with-done.patch @@ -0,0 +1,16 @@ +--- a/src/protocols/core/Output.cpp ++++ b/src/protocols/core/Output.cpp +@@ -194,7 +194,12 @@ + if UNLIKELY (m_defunct) + return; + ++ // A done closes a batch of changes, and a transform change comes only ++ // this way (xdg-output's update schedules it): the mode stays the same, ++ // so modeChanged and updateState never run and wl_output.geometry kept ++ // the old transform for clients bound before the rotation. Send the whole ++ // state, geometry included, which ends with the done. + for (auto const& r : m_outputs) { +- r->m_resource->sendDone(); ++ r->updateState(); + } + } diff --git a/packages/hyprland/PKGBUILD b/packages/hyprland/PKGBUILD index 7a08299e2..c029fc3f0 100644 --- a/packages/hyprland/PKGBUILD +++ b/packages/hyprland/PKGBUILD @@ -20,12 +20,19 @@ # fading out over it on Android's alpha-out curve). # Only with OMAMOBILE_ROTATION_HOLD=1 in Hyprland's environment, which # device-panther sets; other phones rotate as before. +# - 0003-output-send-the-whole-state-with-done.patch: a rotation changes the +# transform but not the mode, so Hyprland sent wl_output.done without a new +# wl_output.geometry, and 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. Every done now carries the whole +# state. Drop it once upstream resends the geometry on a transform change. # - pkgrel 3.2: the higher of Omarchy's (0.57.0-2) and Arch Linux ARM's # (0.57.0-3) release plus .1, so it sorts above both, and .2 for the # rotation hold (3.1 is published); [omamobile] comes before [omarchy] and # [extra] in pacman.conf, so pacman takes this build either way. # - pkgrel 3.3: the rotation hold's half turn over Android's 383 ms and the # old frame faded out on Android's alpha-out curve (3.2 is published). +# - pkgrel 3.4: the wl_output geometry after a rotation (3.3 is published). # - arch=(aarch64) only. # - build() runs the two cmake steps of `make release` itself, with # CMAKE_SKIP_RPATH (Arch's Makefile sed) and the job count from MAKEFLAGS @@ -36,8 +43,8 @@ pkgname=(hyprland hyprpm) pkgver=0.57.0 -pkgrel=3.3 -pkgdesc='a highly customizable dynamic tiling Wayland compositor (Omarchy Mobile: DPMS retry, rotation hold)' +pkgrel=3.4 +pkgdesc='a highly customizable dynamic tiling Wayland compositor (Omarchy Mobile: DPMS retry, rotation hold, wl_output geometry on rotation)' arch=(aarch64) url="https://github.com/hyprwm/Hyprland" license=(BSD-3-Clause) @@ -104,13 +111,15 @@ source=("$_archive.tar.gz::$url/releases/download/v$pkgver/source-v$pkgver.tar.g wl-output-global-grace.patch monitor-rule-vrr.patch 0001-dpms-keep-retrying-a-refused-dpms-commit.patch - 0002-render-hold-the-last-frame-across-a-rotation.patch) + 0002-render-hold-the-last-frame-across-a-rotation.patch + 0003-output-send-the-whole-state-with-done.patch) sha256sums=('82d006ba9264fe67266c7d583c16f1a6c64d51424dbdc472c3e9c9d5ddfcd559' '26d62139b8ae55e286bcdff1838a6bc01a021d8f1039b40b8fa523df83f61610' '8fa0f57dc1b3246ab4e30ae81419150f4af7767fb31e739e36c824c6d99fab73' 'c14fb0ec02d97100bcfa4e5c8daaf524972fa5c665e04960619744ba01c73c39' 'a5670d9a6cdee3f3990a81cdecfd5e1f95771ebd1d7b1e2622ac7187684b8836' - 'c69e64fe55a25a7baa2751ff795ae1f8a1ddfc1d162b9b35f9d821675be02bb7') + 'c69e64fe55a25a7baa2751ff795ae1f8a1ddfc1d162b9b35f9d821675be02bb7' + '2537015f3a03419bfe540622f073c0c5377883f3305c503b80a546f98c106946') prepare() { ln -sf hyprland-source "$_archive" @@ -125,6 +134,8 @@ prepare() { patch -Np1 --fuzz=0 -i "$srcdir/0001-dpms-keep-retrying-a-refused-dpms-commit.patch" # Omarchy Mobile: hold the last frame across a rotation until the layers have drawn, then turn it in as Android does patch -Np1 --fuzz=0 -i "$srcdir/0002-render-hold-the-last-frame-across-a-rotation.patch" + # Omarchy Mobile: send wl_output's whole state, geometry and transform included, with every done + patch -Np1 --fuzz=0 -i "$srcdir/0003-output-send-the-whole-state-with-done.patch" sed -i -e '/find_package.glaze/s/7...<8 //' {.,hyprpm,start}/CMakeLists.txt } diff --git a/packages/hyprland/README.md b/packages/hyprland/README.md index deb85aed9..4143997c0 100644 --- a/packages/hyprland/README.md +++ b/packages/hyprland/README.md @@ -14,6 +14,7 @@ reported the screen off, but the CRTC never turned off. See | `nvidia-egl-teardown.patch`, `wl-output-global-grace.patch`, `monitor-rule-vrr.patch` | Omarchy's patches from the same commit, unchanged (what they fix: their comments in `prepare()`) | | `0001-dpms-keep-retrying-a-refused-dpms-commit.patch` | The Omarchy Mobile change to `src/output/Monitor.cpp` | | `0002-render-hold-the-last-frame-across-a-rotation.patch` | The Omarchy Mobile change to `src/render/Renderer.cpp` and `src/render/OpenGL.cpp` (the rotation hold, below) | +| `0003-output-send-the-whole-state-with-done.patch` | The Omarchy Mobile change to `src/protocols/core/Output.cpp` (wl_output's geometry after a rotation, below) | ## What differs from Omarchy's `hyprland` 0.57.0-2 @@ -32,11 +33,22 @@ reported the screen off, but the CRTC never turned off. See Hyprland's environment (read once at startup): `omamobile-device-panther` sets it in `environment.d`, and the other phones rotate as before until it has run on them. +- wl_output's geometry after a rotation (0003). A rule that only turns the + screen goes through `applyMonitorRuleSoft()` and emits no `modeChanged`, + so `CWLOutputResource::updateState()` never ran: clients bound before the + turn got a `wl_output.done` (from xdg-output's update) but no new + `wl_output.geometry`, and kept the old transform. squeekboard, bound at + login, sized itself for portrait in landscape and covered the screen. + Every done now sends the whole state first (scale, mode, geometry), which + is what updateState already sent on a mode change. On a Pixel 7, Chromium + in landscape with the keyboard up went from -18 px tall to 107, and + squeekboard's horizontal scale setting takes effect again. - `pkgrel=3.3`: the higher of Omarchy's (0.57.0-2) and Arch Linux ARM's (`extra/hyprland` 0.57.0-3, a rebuild for aquamarine 0.16.0 and hyprgraphics 0.6.0) release, plus `.1`, so it sorts above both; `.2` for the rotation hold, since 3.1 is published; `.3` for the half turn's - 383 ms and the alpha-out curve, since 3.2 is published. + 383 ms and the alpha-out curve, since 3.2 is published; `.4` for the + wl_output geometry. - `arch=(aarch64)` only. - `build()` runs the two cmake steps of `make release` itself: - with Arch's `-DCMAKE_SKIP_RPATH=ON` (Arch's PKGBUILD seds it into the