Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/hyprland/0003-output-send-the-whole-state-with-done.patch
Original file line number Diff line number Diff line change
@@ -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();
}
}
19 changes: 15 additions & 4 deletions packages/hyprland/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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"
Expand All @@ -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
}

Expand Down
14 changes: 13 additions & 1 deletion packages/hyprland/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down