From f25a6aa81fde7ab811b7b740753cfc5ee8073584 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 8 Oct 2026 05:33:53 +0000 Subject: [PATCH] app: fix trackpad scrolling on Googlebook On Android 14+ (including Aluminium OS on Googlebooks), trackpad two-finger scroll gestures are dispatched as MotionEvents with CLASSIFICATION_TWO_FINGER_SWIPE. Compose UI 1.12 translates these into PanMove pointer events with panOffset. However, compose-foundation was not explicitly declared and was resolved transitively to 1.10.0 via compose-material3. In foundation 1.10.0, TrackpadScrollingLogic did not exist yet, causing two-finger swipe gestures to be dropped and leaving scrollable views unresponsive. Add explicit compose-foundation and compose-animation dependencies aligned with compose-ui (1.12.1) so all core Compose modules stay in sync and trackpad scrolling is handled properly. Assisted-by: Gemini 3.8 Flash --- app/apk/build.gradle.kts | 2 ++ app/gradle/libs.versions.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/apk/build.gradle.kts b/app/apk/build.gradle.kts index 51813f801..6bb5e66e8 100644 --- a/app/apk/build.gradle.kts +++ b/app/apk/build.gradle.kts @@ -39,6 +39,8 @@ dependencies { // Compose implementation(libs.compose.ui) + implementation(libs.compose.animation) + implementation(libs.compose.foundation) implementation(libs.accompanist.drawablepainter) implementation(libs.compose.ui.tooling.preview) debugImplementation(libs.compose.ui.tooling) diff --git a/app/gradle/libs.versions.toml b/app/gradle/libs.versions.toml index 0cae885d7..0a61b14ea 100644 --- a/app/gradle/libs.versions.toml +++ b/app/gradle/libs.versions.toml @@ -53,6 +53,8 @@ libsu-nio = { module = "com.github.topjohnwu.libsu:nio", version.ref = "libsu" } activity-compose = { module = "androidx.activity:activity-compose", version = "1.13.0" } accompanist-drawablepainter = { module = "com.google.accompanist:accompanist-drawablepainter", version = "0.37.3" } compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose-ui" } +compose-animation = { module = "androidx.compose.animation:animation", version.ref = "compose-ui" } +compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-ui" } compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose-ui" } compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose-ui" } compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-m3" }