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 1/4] 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 From 20941d1b9d20f68de01cfed8d3049abf66d10de8 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 23:29:07 +0100 Subject: [PATCH 2/4] hyprland 0.57.0-3.5: the keyboard on a touch, and the input method's done 0004 (only with OMAMOBILE_IME_ON_TOUCH=1 in Hyprland's environment): a text field that takes focus on its own, as Chromium's address bar does when a window opens, no longer brings up the on-screen keyboard. The input method is activated for a field enabled within 800 ms of a touch or click, or 200 ms after a later touch ends while the field is still the focused, enabled one, as on Android. 0005: closing the window of a focused text field deactivated the input method without a done, so the deactivation never applied. squeekboard stayed active, and a keyboard hidden by hand stayed hidden for every later field until it was restarted. On a Pixel 7 with the switch on: Chromium opened with no touch keeps the whole screen (755 px) and the keyboard down, 6 of 6; a tap on its address bar brings it up (422 px), 5 of 5; a tap on the page leaves it down, 2 of 2; after hiding it by hand, closing and reopening, a tap on the address bar brings it up again, 2 of 2 (before 0005: 0 of 3). An Omawrite (GTK) window behaves the same, 4 of 4. Co-Authored-By: Claude Opus 5.5 --- ...put-bring-the-keyboard-up-on-a-touch.patch | 196 ++++++++++++++++++ ...ethod-apply-a-deactivation-with-done.patch | 15 ++ packages/hyprland/PKGBUILD | 28 ++- packages/hyprland/README.md | 18 +- 4 files changed, 252 insertions(+), 5 deletions(-) create mode 100644 packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch create mode 100644 packages/hyprland/0005-input-method-apply-a-deactivation-with-done.patch diff --git a/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch b/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch new file mode 100644 index 000000000..ad05abf1c --- /dev/null +++ b/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch @@ -0,0 +1,196 @@ +--- a/src/managers/input/InputManager.hpp ++++ b/src/managers/input/InputManager.hpp +@@ -1,5 +1,6 @@ + #pragma once + ++#include + #include "../../defines.hpp" + #include + #include +@@ -229,6 +230,8 @@ + + // for hiding cursor on touch + bool m_lastInputTouch = false; ++ // when a finger or a button last went down or up (OMAMOBILE_IME_ON_TOUCH) ++ std::chrono::steady_clock::time_point m_lastPressTime = {}; + + // for hiding cursor on tablet + bool m_lastInputTablet = false; +--- a/src/managers/input/InputManager.cpp ++++ b/src/managers/input/InputManager.cpp +@@ -718,6 +718,10 @@ + } + + void CInputManager::onMouseButton(IPointer::SButtonEvent e, SP mouse) { ++ m_lastPressTime = std::chrono::steady_clock::now(); ++ if (e.state == WL_POINTER_BUTTON_STATE_RELEASED) ++ textInputPressEnded(); ++ + Event::SCallbackInfo info; + Event::bus()->m_events.input.mouse.button.emit(e, info); + if (info.cancelled) +--- a/src/managers/input/Touch.cpp ++++ b/src/managers/input/Touch.cpp +@@ -16,6 +16,7 @@ + + void CInputManager::onTouchDown(ITouch::SDownEvent e) { + m_lastInputTouch = true; ++ m_lastPressTime = std::chrono::steady_clock::now(); + + static auto PSWIPETOUCH = CConfigValue("gestures:workspace_swipe_touch"); + static auto PGAPSOUTDATA = CConfigValue("general:gaps_out"); +@@ -154,6 +155,8 @@ + + void CInputManager::onTouchUp(ITouch::SUpEvent e, SP device) { + m_lastInputTouch = true; ++ m_lastPressTime = std::chrono::steady_clock::now(); ++ textInputPressEnded(); + + Event::SCallbackInfo info; + Event::bus()->m_events.input.touch.up.emit(e, info); +--- a/src/managers/input/TextInput.hpp ++++ b/src/managers/input/TextInput.hpp +@@ -28,6 +28,7 @@ + void onDisabled(); + void onCommit(); + void onReset(); ++ void activateDeferredIME(); + + bool isEnabled(); + bool hasCursorRectangle(); +@@ -43,6 +44,9 @@ + + WP m_focusedSurface; + int m_enterLocks = 0; ++ // enabled with no touch or click just before it: the input method waits ++ // for one (OMAMOBILE_IME_ON_TOUCH) ++ bool m_imeDeferred = false; + WP m_v3Input; + WP m_v1Input; + +@@ -56,3 +60,6 @@ + CHyprSignalListener surfaceDestroy; + } m_listeners; + }; ++ ++// a touch or a click ended (OMAMOBILE_IME_ON_TOUCH) ++void textInputPressEnded(); +--- a/src/managers/input/TextInput.cpp ++++ b/src/managers/input/TextInput.cpp +@@ -5,6 +5,61 @@ + #include "../../protocols/TextInputV3.hpp" + #include "../../protocols/InputMethodV2.hpp" + #include "../../protocols/core/Compositor.hpp" ++#include "../eventLoop/EventLoopManager.hpp" ++#include "../eventLoop/EventLoopTimer.hpp" ++#include ++#include ++#include ++ ++// OMAMOBILE_IME_ON_TOUCH=1 (read once): a text field that takes focus on its ++// own, as Chromium's address bar does when a window opens, does not bring up ++// the on-screen keyboard; it comes up when the field is touched, as on ++// Android. A field enabled within 800 ms of a touch or click activates the ++// input method at once. One enabled without it waits: 200 ms after the next ++// touch or click ends, if it is still the focused, enabled field (the tap was ++// on it, not on a link that took the focus away), it activates. Clients such ++// as Chromium send no text-input request after that tap until the input ++// method is active, so the compositor has to decide. ++static bool imeOnTouch() { ++ static const bool ON = [] { ++ const char* e = std::getenv("OMAMOBILE_IME_ON_TOUCH"); ++ return e && std::string_view{e} == "1"; ++ }(); ++ return ON; ++} ++ ++static bool pressedRecently() { ++ return std::chrono::steady_clock::now() - g_pInputManager->m_lastPressTime < std::chrono::milliseconds(800); ++} ++ ++void CTextInput::activateDeferredIME() { ++ if (!m_imeDeferred || !isEnabled()) ++ return; ++ ++ LOG(Log::DEBUG, "TI touched: activating the input method"); ++ m_imeDeferred = false; ++ g_pInputManager->m_relay.activateIME(this); ++} ++ ++void textInputPressEnded() { ++ if (!imeOnTouch()) ++ return; ++ ++ static SP timer; ++ if (!timer) { ++ timer = makeShared( ++ std::nullopt, ++ [](SP self, void* data) { ++ const auto TI = g_pInputManager->m_relay.getFocusedTextInput(); ++ if (TI) ++ TI->activateDeferredIME(); ++ }, ++ nullptr); ++ g_pEventLoopManager->addTimer(timer); ++ } ++ ++ timer->updateTimeout(std::chrono::milliseconds(200)); ++} + + CTextInput::CTextInput(WP ti) : m_v1Input(ti) { + initCallbacks(); +@@ -63,6 +118,13 @@ + enter(surfV1); + } + ++ if (imeOnTouch() && !pressedRecently()) { ++ LOG(Log::DEBUG, "TI ENABLE with no touch: the input method waits for one"); ++ m_imeDeferred = true; ++ return; ++ } ++ ++ m_imeDeferred = false; + g_pInputManager->m_relay.activateIME(this); + } + +@@ -72,6 +134,10 @@ + return; + } + ++ // never activated: nothing to deactivate (a keyboard shown by hand stays) ++ const bool WASDEFERRED = m_imeDeferred; ++ m_imeDeferred = false; ++ + if (!isV3()) + leave(); + +@@ -85,6 +151,9 @@ + if (!PFOCUSEDTI || PFOCUSEDTI != this) + return; + ++ if (WASDEFERRED) ++ return; ++ + g_pInputManager->m_relay.deactivateIME(this); + } + +@@ -92,6 +161,9 @@ + if (g_pInputManager->m_relay.m_inputMethod.expired()) + return; + ++ if (m_imeDeferred) ++ return; ++ + if (!focusedSurface()) + return; + +@@ -114,6 +186,9 @@ + return; + } + ++ if (m_imeDeferred) ++ return; ++ + g_pInputManager->m_relay.commitIMEState(this); + } + diff --git a/packages/hyprland/0005-input-method-apply-a-deactivation-with-done.patch b/packages/hyprland/0005-input-method-apply-a-deactivation-with-done.patch new file mode 100644 index 000000000..b6f21fa8b --- /dev/null +++ b/packages/hyprland/0005-input-method-apply-a-deactivation-with-done.patch @@ -0,0 +1,15 @@ +--- a/src/managers/input/InputMethodRelay.cpp ++++ b/src/managers/input/InputMethodRelay.cpp +@@ -121,6 +121,12 @@ + m_inputMethod->deactivate(); + if (shouldCommit) + commitIMEState(pInput); ++ else if (!pInput) ++ // No text input will commit a state after this one (its owner is gone), ++ // so send the done that applies the deactivation. Without it the input ++ // method stayed active: squeekboard kept a keyboard hidden by hand ++ // hidden for every later text field, until it was restarted. ++ m_inputMethod->done(); + } + + void CInputMethodRelay::commitIMEState(CTextInput* pInput) { diff --git a/packages/hyprland/PKGBUILD b/packages/hyprland/PKGBUILD index c029fc3f0..6ef178b72 100644 --- a/packages/hyprland/PKGBUILD +++ b/packages/hyprland/PKGBUILD @@ -26,6 +26,17 @@ # 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. +# - 0004-input-bring-the-keyboard-up-on-a-touch.patch: a text field that +# takes focus on its own (Chromium's address bar when a window opens) +# brought up the on-screen keyboard over half the screen. With +# OMAMOBILE_IME_ON_TOUCH=1 in Hyprland's environment the input method is +# activated only for a field enabled within 800 ms of a touch or click, or +# 200 ms after a later touch ends while the field is still focused and +# enabled, as on Android. Off by default, read once at startup. +# - 0005-input-method-apply-a-deactivation-with-done.patch: when the window +# of a focused text field closed, the input method got deactivate with no +# done, so it stayed active; a keyboard hidden by hand then never came back +# for later fields until squeekboard was restarted. The done is sent now. # - 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 @@ -33,6 +44,7 @@ # - 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). +# - pkgrel 3.5: the keyboard on a touch and the input method's done. # - 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 @@ -43,8 +55,8 @@ pkgname=(hyprland hyprpm) pkgver=0.57.0 -pkgrel=3.4 -pkgdesc='a highly customizable dynamic tiling Wayland compositor (Omarchy Mobile: DPMS retry, rotation hold, wl_output geometry on rotation)' +pkgrel=3.5 +pkgdesc='a highly customizable dynamic tiling Wayland compositor (Omarchy Mobile: DPMS retry, rotation hold, wl_output geometry on rotation, keyboard on a touch)' arch=(aarch64) url="https://github.com/hyprwm/Hyprland" license=(BSD-3-Clause) @@ -112,14 +124,18 @@ source=("$_archive.tar.gz::$url/releases/download/v$pkgver/source-v$pkgver.tar.g monitor-rule-vrr.patch 0001-dpms-keep-retrying-a-refused-dpms-commit.patch 0002-render-hold-the-last-frame-across-a-rotation.patch - 0003-output-send-the-whole-state-with-done.patch) + 0003-output-send-the-whole-state-with-done.patch + 0004-input-bring-the-keyboard-up-on-a-touch.patch + 0005-input-method-apply-a-deactivation-with-done.patch) sha256sums=('82d006ba9264fe67266c7d583c16f1a6c64d51424dbdc472c3e9c9d5ddfcd559' '26d62139b8ae55e286bcdff1838a6bc01a021d8f1039b40b8fa523df83f61610' '8fa0f57dc1b3246ab4e30ae81419150f4af7767fb31e739e36c824c6d99fab73' 'c14fb0ec02d97100bcfa4e5c8daaf524972fa5c665e04960619744ba01c73c39' 'a5670d9a6cdee3f3990a81cdecfd5e1f95771ebd1d7b1e2622ac7187684b8836' 'c69e64fe55a25a7baa2751ff795ae1f8a1ddfc1d162b9b35f9d821675be02bb7' - '2537015f3a03419bfe540622f073c0c5377883f3305c503b80a546f98c106946') + '2537015f3a03419bfe540622f073c0c5377883f3305c503b80a546f98c106946' + 'f4abfd6cb7b5d4bc3d8f036af0e8aee85f3337b489f2b27ebf572a554c54a506' + 'e8c163b9adbfce75cf26af235dbb20bb7ab57016ab17ec2897254257f549421b') prepare() { ln -sf hyprland-source "$_archive" @@ -136,6 +152,10 @@ prepare() { 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" + # Omarchy Mobile: with OMAMOBILE_IME_ON_TOUCH=1, bring the keyboard up for a touched text field only + patch -Np1 --fuzz=0 -i "$srcdir/0004-input-bring-the-keyboard-up-on-a-touch.patch" + # Omarchy Mobile: send the done that applies an input method deactivation when the text input is gone + patch -Np1 --fuzz=0 -i "$srcdir/0005-input-method-apply-a-deactivation-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 4143997c0..06d3a9767 100644 --- a/packages/hyprland/README.md +++ b/packages/hyprland/README.md @@ -15,6 +15,8 @@ reported the screen off, but the CRTC never turned off. See | `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) | +| `0004-input-bring-the-keyboard-up-on-a-touch.patch` | The Omarchy Mobile change to `src/managers/input/` (the keyboard on a touch, below) | +| `0005-input-method-apply-a-deactivation-with-done.patch` | The Omarchy Mobile change to `src/managers/input/InputMethodRelay.cpp` (below) | ## What differs from Omarchy's `hyprland` 0.57.0-2 @@ -43,12 +45,26 @@ reported the screen off, but the CRTC never turned off. See 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. +- The keyboard on a touch (0004), with `OMAMOBILE_IME_ON_TOUCH=1` in + Hyprland's environment (read once at startup; off, nothing changes). A + field enabled within 800 ms of a touch or click activates the input method + at once, as before. One enabled with no touch (Chromium's address bar as a + window opens, a GTK text view) waits: 200 ms after the next touch or click + ends, if it is still the focused, enabled field, it activates. A tap on a + link or elsewhere takes the focus away first, so the keyboard stays down. + Chromium and GTK send no text-input request after that tap until the input + method is active, so the compositor decides. A keyboard brought up by hand + still types (squeekboard falls back to its virtual keyboard). +- The input method's done (0005). Closing the window of a focused text field + deactivated the input method without a done, so it never applied: + squeekboard stayed active, and a keyboard hidden by hand stayed hidden for + every later field until it was restarted. - `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; `.4` for the - wl_output geometry. + wl_output geometry; `.5` for the keyboard on a touch and the done. - `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 From c8ba83537292784cbec1d640783ebc4839e448f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Sun, 15 Nov 2026 01:20:55 +0100 Subject: [PATCH 3/4] hyprland: count only a touch on the text field's own app With OMAMOBILE_IME_ON_TOUCH=1, any touch in the 800 ms before a text field was enabled brought the keyboard up. A back gesture in recent apps, or a tap on a recent app's card, brings an app forward, and a terminal or a focused field there then enabled its text input right after the shell's touch: the keyboard came up over the app on its own. The touch or click now has to have gone down on a surface of the field's own client, both for the immediate activation and for the deferred one after the next touch. Tested on my Pixel 7 (Hyprland cross-built with these patches, portrait): back from recent apps to Foot, keyboard down (was up); tap on Foot's card in recent apps, keyboard down; Chromium opened, keyboard down, tap on the address bar, up, tap on the page, down. A run of 19 shell gestures (home, drawer, recent apps, back, keyboard) passes. Co-Authored-By: Claude Opus 5.5 --- ...put-bring-the-keyboard-up-on-a-touch.patch | 45 +++++++++++++------ packages/hyprland/PKGBUILD | 2 +- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch b/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch index ad05abf1c..0a884aeed 100644 --- a/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch +++ b/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch @@ -7,22 +7,26 @@ #include "../../defines.hpp" #include #include -@@ -229,6 +230,8 @@ +@@ -229,6 +230,10 @@ // for hiding cursor on touch bool m_lastInputTouch = false; + // when a finger or a button last went down or up (OMAMOBILE_IME_ON_TOUCH) + std::chrono::steady_clock::time_point m_lastPressTime = {}; ++ // the surface that finger or button went down on (OMAMOBILE_IME_ON_TOUCH) ++ WP m_lastPressSurface; // for hiding cursor on tablet bool m_lastInputTablet = false; --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp -@@ -718,6 +718,10 @@ +@@ -718,6 +718,12 @@ } void CInputManager::onMouseButton(IPointer::SButtonEvent e, SP mouse) { + m_lastPressTime = std::chrono::steady_clock::now(); ++ if (e.state == WL_POINTER_BUTTON_STATE_PRESSED) ++ m_lastPressSurface = g_pSeatManager->m_state.pointerFocus; + if (e.state == WL_POINTER_BUTTON_STATE_RELEASED) + textInputPressEnded(); + @@ -39,7 +43,13 @@ static auto PSWIPETOUCH = CConfigValue("gestures:workspace_swipe_touch"); static auto PGAPSOUTDATA = CConfigValue("general:gaps_out"); -@@ -154,6 +155,8 @@ +@@ -149,11 +150,14 @@ + } else + return; // oops, nothing found. + ++ m_lastPressSurface = m_touchData.touchFocusSurface; + g_pSeatManager->sendTouchDown(m_touchData.touchFocusSurface.lock(), e.timeMs, e.touchID, local); + } void CInputManager::onTouchUp(ITouch::SUpEvent e, SP device) { m_lastInputTouch = true; @@ -77,7 +87,7 @@ +void textInputPressEnded(); --- a/src/managers/input/TextInput.cpp +++ b/src/managers/input/TextInput.cpp -@@ -5,6 +5,61 @@ +@@ -5,6 +5,68 @@ #include "../../protocols/TextInputV3.hpp" #include "../../protocols/InputMethodV2.hpp" #include "../../protocols/core/Compositor.hpp" @@ -95,7 +105,9 @@ +// touch or click ends, if it is still the focused, enabled field (the tap was +// on it, not on a link that took the focus away), it activates. Clients such +// as Chromium send no text-input request after that tap until the input -+// method is active, so the compositor has to decide. ++// method is active, so the compositor has to decide. Only a touch or click on ++// the field's own client counts: a back gesture or a tap on a recent app's ++// card (the shell's surfaces) that brings an app forward leaves it down. +static bool imeOnTouch() { + static const bool ON = [] { + const char* e = std::getenv("OMAMOBILE_IME_ON_TOUCH"); @@ -104,12 +116,17 @@ + return ON; +} + -+static bool pressedRecently() { -+ return std::chrono::steady_clock::now() - g_pInputManager->m_lastPressTime < std::chrono::milliseconds(800); ++static bool pressedOn(SP surface) { ++ const auto PRESSED = g_pInputManager->m_lastPressSurface.lock(); ++ return surface && PRESSED && PRESSED->client() == surface->client(); ++} ++ ++static bool pressedRecentlyOn(SP surface) { ++ return std::chrono::steady_clock::now() - g_pInputManager->m_lastPressTime < std::chrono::milliseconds(800) && pressedOn(surface); +} + +void CTextInput::activateDeferredIME() { -+ if (!m_imeDeferred || !isEnabled()) ++ if (!m_imeDeferred || !isEnabled() || !pressedOn(focusedSurface())) + return; + + LOG(Log::DEBUG, "TI touched: activating the input method"); @@ -139,11 +156,11 @@ CTextInput::CTextInput(WP ti) : m_v1Input(ti) { initCallbacks(); -@@ -63,6 +118,13 @@ +@@ -63,6 +125,13 @@ enter(surfV1); } -+ if (imeOnTouch() && !pressedRecently()) { ++ if (imeOnTouch() && !pressedRecentlyOn(focusedSurface())) { + LOG(Log::DEBUG, "TI ENABLE with no touch: the input method waits for one"); + m_imeDeferred = true; + return; @@ -153,7 +170,7 @@ g_pInputManager->m_relay.activateIME(this); } -@@ -72,6 +134,10 @@ +@@ -72,6 +141,10 @@ return; } @@ -164,7 +181,7 @@ if (!isV3()) leave(); -@@ -85,6 +151,9 @@ +@@ -85,6 +158,9 @@ if (!PFOCUSEDTI || PFOCUSEDTI != this) return; @@ -174,7 +191,7 @@ g_pInputManager->m_relay.deactivateIME(this); } -@@ -92,6 +161,9 @@ +@@ -92,6 +168,9 @@ if (g_pInputManager->m_relay.m_inputMethod.expired()) return; @@ -184,7 +201,7 @@ if (!focusedSurface()) return; -@@ -114,6 +186,9 @@ +@@ -114,6 +193,9 @@ return; } diff --git a/packages/hyprland/PKGBUILD b/packages/hyprland/PKGBUILD index 6ef178b72..b1812e33e 100644 --- a/packages/hyprland/PKGBUILD +++ b/packages/hyprland/PKGBUILD @@ -134,7 +134,7 @@ sha256sums=('82d006ba9264fe67266c7d583c16f1a6c64d51424dbdc472c3e9c9d5ddfcd559' 'a5670d9a6cdee3f3990a81cdecfd5e1f95771ebd1d7b1e2622ac7187684b8836' 'c69e64fe55a25a7baa2751ff795ae1f8a1ddfc1d162b9b35f9d821675be02bb7' '2537015f3a03419bfe540622f073c0c5377883f3305c503b80a546f98c106946' - 'f4abfd6cb7b5d4bc3d8f036af0e8aee85f3337b489f2b27ebf572a554c54a506' + '6059dd37dced4f7fed73c2f73aa964ca10bbecc4cdfc858cadfce7ffc0f7de37' 'e8c163b9adbfce75cf26af235dbb20bb7ab57016ab17ec2897254257f549421b') prepare() { From 4025ecdcc513899b315c3804bd7f36a68d1398d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Sun, 15 Nov 2026 14:02:13 +0100 Subject: [PATCH 4/4] hyprland: a touch that stops early counts on no surface onTouchDown stamped the time at the top but set the pressed surface only at the end, after its early returns (a cancelled touch, one taken by a workspace swipe, nothing under the finger). Such a touch left the previous press's surface with a fresh time, and its touch-up still ran textInputPressEnded(), so it could count as a touch on the focused app. The surface is now cleared next to the time. A button press already sets it before anything can return. Co-Authored-By: Claude Opus 5.5 --- .../0004-input-bring-the-keyboard-up-on-a-touch.patch | 6 ++++-- packages/hyprland/PKGBUILD | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch b/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch index 0a884aeed..438f0e20c 100644 --- a/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch +++ b/packages/hyprland/0004-input-bring-the-keyboard-up-on-a-touch.patch @@ -35,15 +35,17 @@ if (info.cancelled) --- a/src/managers/input/Touch.cpp +++ b/src/managers/input/Touch.cpp -@@ -16,6 +16,7 @@ +@@ -16,6 +16,9 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) { m_lastInputTouch = true; ++ // set below once the touch reaches a surface; a touch that returns early counts on none + m_lastPressTime = std::chrono::steady_clock::now(); ++ m_lastPressSurface.reset(); static auto PSWIPETOUCH = CConfigValue("gestures:workspace_swipe_touch"); static auto PGAPSOUTDATA = CConfigValue("general:gaps_out"); -@@ -149,11 +150,14 @@ +@@ -149,11 +152,14 @@ } else return; // oops, nothing found. diff --git a/packages/hyprland/PKGBUILD b/packages/hyprland/PKGBUILD index b1812e33e..cf118b9e2 100644 --- a/packages/hyprland/PKGBUILD +++ b/packages/hyprland/PKGBUILD @@ -134,7 +134,7 @@ sha256sums=('82d006ba9264fe67266c7d583c16f1a6c64d51424dbdc472c3e9c9d5ddfcd559' 'a5670d9a6cdee3f3990a81cdecfd5e1f95771ebd1d7b1e2622ac7187684b8836' 'c69e64fe55a25a7baa2751ff795ae1f8a1ddfc1d162b9b35f9d821675be02bb7' '2537015f3a03419bfe540622f073c0c5377883f3305c503b80a546f98c106946' - '6059dd37dced4f7fed73c2f73aa964ca10bbecc4cdfc858cadfce7ffc0f7de37' + '9cbc5cca5f0e95b18c7bbcf41dbf9367d01d722262f0aa953595797e29086784' 'e8c163b9adbfce75cf26af235dbb20bb7ab57016ab17ec2897254257f549421b') prepare() {