Repository navigation
hyprland 0.57.0-3.5: the keyboard on a touch, and the input method's done - #786
angelrenefm wants to merge 4 commits into
Conversation
|
Thank you, Ángel. Both halves are well made. The keyboard on a touch is behind The sums match, and 0004 and 0005 apply with 0005 changes every phone, so it goes into the same Pixel 7 Pro run as the other three, in one build. This one merges last, after #785, as 0.57.0-3.7 with the patches renamed Two questions about 0004 with the switch on, for before panther turns it on rather than for this merge:
|
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>
…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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
7ff49d7 to
4025ecd
Compare
|
Thank you, Derek. Both questions, with the switch on:
I've also added the |
|
A follow-up on your first question: the case happens on the phone. I've now run this branch's build on my Pixel 7, with the switch on. My test script takes a screenshot with The build before this commit passed the same script every time (4 of 4 on Omawrite). I didn't trace it then, so I can't show that those taps were lost too, but that matches the early return you described: a fresh time with the previous press's surface. I haven't looked into why a tap right after a screencopy gets dropped. On this build the 19 shell gestures I run (home, drawer, recent apps, back, keyboard) give the same results as before. |
|
Thank you, Ángel, for both answers and for finding the case on the phone. The reset next to the timestamp is the right fix. I read it through in the patched tree: Your screenshot observation is interesting: taps that never reach the app right after a I've applied all four open Hyprland changes together in every order they could merge, and the compositor comes out the same each time, so this goes in last as 0.57.0-3.7 with |
Depends on #785. This branch is on top of it, so its first commit is #785's (hyprland 3.4, the wl_output geometry). The second and third commits are new.
What and why
0004, the keyboard on a touch (behind a switch). A text field that takes focus on its own brought up the on-screen keyboard over half the screen. Chromium's address bar does this every time a window opens, and so does a GTK text view like Omawrite's. On Android the keyboard comes up only when you touch the field.
With
OMAMOBILE_IME_ON_TOUCH=1in Hyprland's environment (read once at startup; unset, nothing changes):Chromium and GTK send no text-input request after that tap until the input method is active (checked with
WAYLAND_DEBUG=1), so the compositor has to decide. A keyboard brought up by hand still types, because squeekboard falls back to its virtual keyboard.0005, the input method's done (a stock bug, no switch). When the window of a focused text field closed,
CTextInput::destroy()deactivated the input method without adone, so the deactivation never applied. squeekboard stayed active, and a keyboard hidden by hand (hideKeyboard) stayed hidden for every later field until squeekboard was restarted. Its state machine only clears the manual hide on an active/inactive transition, and that transition never arrived.deactivateIME()now sends thedonewhen no text input will commit a state after it.Tested
On my Pixel 7 (Hyprland built with these patches,
OMAMOBILE_IME_ON_TOUCH=1), with taps from a virtual touchscreen (uinput) and squeekboard'sVisibleread over D-Bus:tools/pr-checkpasses, the sha256sums match, and both patches apply with--fuzz=0after 0001-0003.Notes
omamobile-device-pantherwould set it inenvironment.d, as it doesOMAMOBILE_ROTATION_HOLD. I'll send that as a separate PR once you're happy with this one.makepkg.I used AI help (Claude) to work on this.