From 25454f32420192b119cec1df70b9f980e9c720cf Mon Sep 17 00:00:00 2001 From: den-kloot <1522975+den-kloot@users.noreply.github.com> Date: Mon, 9 Nov 2026 14:04:17 +0100 Subject: [PATCH] omamobile-shell 0.2.108: the home strip under the keyboard on the home screen and over the drawer With the keyboard up on the home screen (the dock's search pill) or over the drawer (its search field), the keyboard covers the dock, and with it the swipe up. The strip wasn't mapped there, so the only way out was the keyboard's Hide key first. While the keyboard is up the strip now shows on the home screen and over the open drawer too. Its swipe up hides the keyboard and opens the drawer from the home screen (as the dock's swipe does), or closes the drawer over it. Over the drawer a long swipe or a hold opens no recent apps: in the first version it did, and the drawer stayed half open over the app picked from them. The dock still reserves nothing on the home screen, so the strip is the only reserving bottom window there. test/pill-touch: the keyboard on home brings the strip (alone), a swipe in it on home opens the drawer and hides the keyboard, and over the drawer it closes the drawer with no recent apps. test/all follows the new condition. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01176vSdGN6JWgiwDLYXe1ES --- .../plugins/omamobile.launcher/Launcher.qml | 26 +++++++++++++---- packages/omamobile-shell/test/all | 5 ++-- packages/omamobile-shell/test/pill-touch | 1 + packages/omamobile-shell/test/pill-touch.qml | 29 ++++++++++++++++++- packages/omamobile-shell/version | 2 +- 5 files changed, 54 insertions(+), 9 deletions(-) diff --git a/packages/omamobile-shell/plugins/omamobile.launcher/Launcher.qml b/packages/omamobile-shell/plugins/omamobile.launcher/Launcher.qml index 7bf8562e8..8ccbb3505 100644 --- a/packages/omamobile-shell/plugins/omamobile.launcher/Launcher.qml +++ b/packages/omamobile-shell/plugins/omamobile.launcher/Launcher.qml @@ -470,7 +470,8 @@ Item { // controls apps keep at the very bottom (the Phone app's Favorites, // Recents, Contacts and Keypad tabs). The zone goes with the window: the // strip isn't mapped on the home screen (the dock reserves its own height - // there), with the drawer open, under the lock screen's keyboard, or for + // there) or with the drawer open, unless the keyboard is up and covers the + // dock; nor under the lock screen's keyboard, or for // a fullscreen window (video, the screensaver), which keeps the whole // screen. Under the lock it isn't drawn (no above_lock rule in // hypr/phone.lua), and the session lock's surface covers the whole screen @@ -667,7 +668,10 @@ Item { // The strip is on screen (each screen's window shows with it), and it is // the keyboard's strip: the keyboard is up above it. - readonly property bool stripShown: appOnScreen && !opened && !fullscreenOnScreen && !(oskOpen && sessionLocked) + // While the keyboard is up the strip shows on the home screen too, and + // over the open drawer (its search field): the keyboard covers the dock + // there, and with it the swipe up to the drawer. + readonly property bool stripShown: (appOnScreen || oskOpen) && (!opened || oskOpen) && !fullscreenOnScreen && !(oskOpen && sessionLocked) readonly property bool keyboardStripShown: stripShown && oskOpen Process { @@ -1224,7 +1228,9 @@ Item { property bool recents: false onActiveTranslationChanged: { swipeY = activeTranslation.y - if (recents) return + // Over the open drawer a swipe only closes it: recent apps from + // there left the drawer half open over the next app. + if (recents || root.opened) return if (swipeY < -120) { recents = true hold.stop() @@ -1237,7 +1243,17 @@ Item { if (active) { swipeY = 0; recents = false; return } hold.stop() console.log("omamobile-home-indicator: swipe", Math.round(swipeY), recents ? "recents" : "", "(" + swipeArea.strip + ")") - if (!recents && swipeY < -24) root.goHome() + if (!recents && swipeY < -24 && root.opened) { + // Over the drawer (searching): the keyboard goes and the drawer + // closes, back to the home screen. + root.keyboardCall("hideKeyboard") + root.dismiss(0) + } else if (!recents && swipeY < -24 && !root.appOnScreen) { + // On the home screen (the keyboard's strip, no app): the drawer + // opens, as the dock's swipe does, and the keyboard goes. + root.keyboardCall("hideKeyboard") + root.expand() + } else if (!recents && swipeY < -24) root.goHome() } } @@ -1245,7 +1261,7 @@ Item { id: hold interval: 350 onTriggered: { - if (!swipe.active || swipe.recents) return + if (!swipe.active || swipe.recents || root.opened) return swipe.recents = true root.showRecents() } diff --git a/packages/omamobile-shell/test/all b/packages/omamobile-shell/test/all index 9e19f2609..8476f54a5 100755 --- a/packages/omamobile-shell/test/all +++ b/packages/omamobile-shell/test/all @@ -145,7 +145,7 @@ def vis(w): v = re.sub(r"(^|[^.\w])(\w+)", lambda x: x.group(1) + ("root." + x.group(2) if x.group(2) not in ("true", "false") else x.group(2)), d) return v v = vis(strip) -for need in ("root.appOnScreen", "!root.opened", "!root.fullscreenOnScreen", "!(root.oskOpen && root.sessionLocked)"): +for need in ("(root.appOnScreen || root.oskOpen)", "(!root.opened || root.oskOpen)", "!root.fullscreenOnScreen", "!(root.oskOpen && root.sessionLocked)"): assert need in v, (need, v) assert "!root.oskOpen" not in v, "the keyboard doesn't unmap the strip: " + v assert "!root.appOnScreen" in vis(dock), "the dock and the strip never reserve together" @@ -174,7 +174,8 @@ elif [[ $rc != 0 ]]; then else pass "the home pill under touch: a double tap toggles the keyboard, a tap does nothing, swipes go home, the hide key, the reserved strip, the search pill, the hold for voice" fi -grep -c 'if (!recents && swipeY < -24) root.goHome()' "$l" >/dev/null || fail "a short swipe goes home" +grep -c '} else if (!recents && swipeY < -24) root.goHome()' "$l" >/dev/null || fail "a short swipe goes home" +grep -c 'if (recents || root.opened) return' "$l" >/dev/null || fail "over the drawer a swipe opens no recent apps" grep -c 'if (swipeY < -120) {' "$l" >/dev/null || fail "a long swipe opens recent apps" # Drawer: pull down to close, and a pull is not also a tap on an app. grep -c 'if (LauncherModel.drawerEndsOpen(root.progress, speed, true)) root.settleTo(true, speed)' "$l" >/dev/null || fail "pulling the drawer down closes it" diff --git a/packages/omamobile-shell/test/pill-touch b/packages/omamobile-shell/test/pill-touch index 28e13fe2e..c33fbb08d 100755 --- a/packages/omamobile-shell/test/pill-touch +++ b/packages/omamobile-shell/test/pill-touch @@ -115,6 +115,7 @@ Item { readonly property string agentName: "" readonly property color foreground: "#c0caf5" function expand() { Quickshell.execDetached(["expand"]) } + function dismiss(speed) { Quickshell.execDetached(["dismiss"]) } %s diff --git a/packages/omamobile-shell/test/pill-touch.qml b/packages/omamobile-shell/test/pill-touch.qml index 01e124c37..6c34f5422 100644 --- a/packages/omamobile-shell/test/pill-touch.qml +++ b/packages/omamobile-shell/test/pill-touch.qml @@ -236,7 +236,14 @@ Item { var z = zones({}) compare(z.total, 0, JSON.stringify(z)) compare(zones({ drawer: true }).total, 0, "nor with the drawer open") - compare(zones({ osk: true }).strip, 0, "nor the strip with the keyboard on home") + } + + function test_the_keyboard_on_home_brings_the_strip() { + // The keyboard covers the dock (and its swipe) on the home screen and + // over the drawer's search, so the strip comes back above it there. + compare(zones({ osk: true }).strip, harness.touch, "the keyboard on home") + compare(zones({ drawer: true, osk: true }).strip, harness.touch, "the keyboard over the drawer") + compare(zones({ osk: true }).reserving, 1, "the strip alone") } function test_a_fullscreen_window_keeps_the_whole_screen() { @@ -297,6 +304,26 @@ Item { compare(calls("hl.dsp.focus"), 0) } + function test_swipe_in_the_keyboard_strip_on_home_opens_the_drawer() { + zones({ osk: true }) + var strip = find(harness, "keyboardStrip") + swipeUp(strip, 60, strip.height / 2) + compare(calls("expand"), 1, JSON.stringify(Quickshell.executed)) + compare(keyboardCalls("hideKeyboard"), 1, "the keyboard goes") + compare(calls("hl.dsp.focus"), 0, "not home: already there") + zones({ app: true, osk: true }) + } + + function test_swipe_in_the_keyboard_strip_over_the_drawer_closes_it() { + zones({ drawer: true, osk: true }) + var strip = find(harness, "keyboardStrip") + swipeUp(strip, 60, strip.height / 2) + compare(calls("dismiss"), 1, JSON.stringify(Quickshell.executed)) + compare(keyboardCalls("hideKeyboard"), 1, "the keyboard goes") + compare(calls("omamobile.switcher"), 0, "no recent apps over the drawer") + zones({ app: true, osk: true }) + } + function test_swipe_in_the_keyboard_strip_goes_home() { var strip = find(harness, "keyboardStrip") swipeUp(strip, 60, strip.height / 2) diff --git a/packages/omamobile-shell/version b/packages/omamobile-shell/version index 924e96608..aa7ceeb16 100644 --- a/packages/omamobile-shell/version +++ b/packages/omamobile-shell/version @@ -1 +1 @@ -0.2.107 +0.2.108