Repository navigation
Chore: Move the Compose fork to 1.11.1-ext.5, with wheel tests through the real window - #852
Merged
Merged
Conversation
The Compose, window and Windows pins all move to 96ae925f7fb6a730d7af31c2c29c856f35778d25, the tip of the fork's extended branch and the commit its v1.11.1-ext.5 tag goes on. It publishes every line as 1.11.1-ext.5, so COMPOSE_AS, MATERIAL3_AS and SKIKO_AWT_AS move with it, and every live coordinate follows: the renderer module.yaml files, COMPOSE_VERSION in Transform3DLayers.kt and its staged Android copy (stage-android-kotlin.sh), the troubleshooting guides in English and Korean, the scripts, the test comments and the workflow comment. ext.5 is the first tag since the ext.2 build that changes Compose itself, in foundation (fork #240). The Kotlin/Native Windows and Linux scroll configs answer the wheel with the sign and the line desktop Compose uses on the same system; before, the wheel scrolled the wrong way there, and on Windows three times too far. The macOS config works out a scroll with no NSEvent from its travel, 10 dp a line, where it came to zero. The scene sends a scroll where the pointer last was (ScenePointer) instead of the top left corner, and the macOS window places the pointer before a scroll that came before any move. Together they make the wheel and the trackpad scroll on the Kotlin/Native macOS window, where nothing scrolled. The tag also holds what the window pin carried past ext.4 (fork #232, #235, #239, #236, #234, #237) and the AT-SPI readback tool matching roles by number (fork #241). No glue changes: the renderer calls none of the scene's input functions (its Linux and Windows windows go through its own WindowEvents.kt, which already scrolls at the last pointer place, and the macOS renderer goes through the fork's scene), and the C symbols the desktops link are unchanged (desktop-c-symbols.test.sh). compose-fork.changes and compose-fork-mingw.changes are regenerated from 73ac849 to the new pin. No path is dropped; the new paths are the foundation scroll configs and their tests, the fork's wheel and native view tests, two fork workflows and its AGENTS.md. The historical CHANGELOG entry for ext.4 keeps its version and ext.5 gets its own. The tag and the Maven Central artifacts do not exist yet; this was built and checked against 1.11.1-ext.5 published into ~/.m2 from the same commit.
…trackpad WheelScrollWindowTest opens a Kotlin/Native macOS window the way the renderer does (MacosWindow with ComposeRustContent over a scripted Host), with a box that does not scroll at the top left corner and a ScrollColumn and a LazyColumn beside it, each started in the middle of its content. It moves the pointer over one container and hands the view under it AppKit scroll events made with CGEventCreateScrollWheelEvent2: -3 and +3 lines, and -40 and +40 pixels. It reads where each container is from its ScrollChanged reports and asserts that -3 lines moves the one under the pointer 3 lines of 10 points toward its end, +3 brings it back, 40 trackpad points move it 40 points, and the other container does not move. It would have caught the bug ext.5 fixes (fork #240): against the 1.11.1-ext.4 pins all three tests fail with the container moved by 0.0 pixels, because every scroll reached the scene at the window's corner and its distance came to zero. Covers FR-13.6 (scroll containers) for pointer input on the macOS window.
LinuxWheelScrollTest opens a window through the Linux backend with the same page as the macOS wheel test: a box at the corner, a ScrollColumn and a LazyColumn started in the middle of their content. Another display client sends the window a MotionNotify over a container, then a button 5 press and release (a notch toward the reader) and a button 4 one, with XSendEvent. The container under the pointer must move toward its end by three lines of the square root of its height in pixels and then come back, and the other one must stay. Against 1.11.1-ext.4 the notch down would move the container toward the top, by 64 dp a line, which is the wrong-way wheel fork #240 fixes. Runs under Xvfb in the Kotlin/Native desktop renderer test (linux); it cannot run or compile on a Mac. Covers FR-13.6.
The Windows renderer carries its real-window checks itself (Fr53WindowsCheck.kt), because a Kotlin/Native test executable for mingwX64 cannot link the MSVC-built window. fr13_windows_a_wheel_turned_forward_scrolls_toward_the_top joins them: a window with a box at the corner and a ScrollColumn and a LazyColumn started in their middle, the real pointer moved over a container and a WM_MOUSEMOVE posted, then a WM_MOUSEWHEEL of +120 (forward, away from the reader) and one of -120. The container must move toward the top by the system's wheel lines of a twentieth of its height and come back; the other must stay. Against 1.11.1-ext.4 the forward notch moves the container toward its end, three times as far, which is what fork #240 fixes. check-windows-consumer.sh and fr53-windows-backend.test.sh read every `fr<N>_windows_*` name from the Kotlin instead of only `fr53_windows_*`, so the new check is required to print its ok line. It runs in the consumer job of the Windows static renderer workflow (windows_static_consumer in ci.yml). Covers FR-13.6.
Both sides added checks to the Windows real-window harness: develop the two text edit menu checks, this branch the wheel check. Both are kept, and the consumer script and its script test now read every fr<N>_windows and fr<N>_<M>_windows name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What moved
The Compose, window and Windows pins in
renderer/scripts/build-compose.sh(REVISION,WINDOW_REVISION,MINGW_REVISION) all move to96ae925f7fb6a730d7af31c2c29c856f35778d25, the tip of the fork'sextendedand the commit thev1.11.1-ext.5tag will go on. Itsgradle.propertiespublishes every line as1.11.1-ext.5, soCOMPOSE_AS,MATERIAL3_ASandSKIKO_AWT_ASmove with it, and so does every live coordinate: the four renderermodule.yamlfiles,COMPOSE_VERSIONinTransform3DLayers.ktand its staged Android copy, the troubleshooting guides (en, ko), the script and test comments and thetest-compose-from-fork.ymlcomment.compose-fork.changesandcompose-fork-mingw.changesare regenerated from 73ac849 with the command at the top of the file. No path is dropped. The CHANGELOG has a newUnreleasedentry, and the ext.4 entry keeps its version.What the pins hold
ScenePointer) instead of the top left corner, and the macOS window places the pointer before a scroll that came before any move.Glue
No glue change was needed. The renderer calls none of the fork scene's input functions. Its Linux and Windows windows go through
renderer/desktop/src/WindowEvents.kt, which already scrolls atlastPointerPosition. The macOS renderer goes through the fork'sComposeWindowHost, andMacosNativeViewWindowpasses every event through once. So no scroll is sent twice, and none goes to a different place. The desktop C symbols are unchanged (desktop-c-symbols.test.sh). A side note, not changed here:lastPointerPositionis one process-wide value, so with several windows, a wheel in one window before any move there scrolls at the last place in another window.Wheel tests through the real window
renderer/macos/test/WheelScrollWindowTest.kt:fr13_a_wheel_over_a_scroll_column_...,fr13_a_wheel_over_a_lazy_column_...,fr13_a_trackpad_moves_...CGEventCreateScrollWheelEvent2-3/+3 lines and -40/+40 pixels to that viewrenderer/linux/test/LinuxWheelScrollTest.ktfr13_windows_a_wheel_turned_forward_scrolls_toward_the_topinFr53WindowsCheck.kt(the renderer's real-window harness, because a mingw test executable cannot link the MSVC window)SetCursorPosand a postedWM_MOUSEMOVE, thenWM_MOUSEWHEEL+120 and -120check-windows-consumer.shin Windows static renderer (consumer). The script now reads everyfr<N>_windows_*name.The Linux and Windows tests cannot compile or run on a Mac: there are no linuxX64 or mingwX64 fork artifacts here. They were written against the APIs they use and need CI to show them green.
Red then green on macOS
The test ran once with develop's 1.11.1-ext.4 pins, before they moved. All three failed:
At the ext.5 pins, built locally, all three pass.
Local gate (ext.5 built into ~/.m2 from 96ae925f)
The artifacts were built with
build-compose.sh --target desktopand--target macosArm64,publish-skiko-awt.shandpublish-window.sh, withDXC_COMPOSE_BUILDunder.scratch/. The ext.4 files in ~/.m2 were not changed: every ext.4.moduleand.pomis byte-identical before and after, and no file of an older version is newer than the publish.fetch-design-systems.sh, stand-in renderercargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspacescripts/tests/*.test.sh(88)require-fork-artifacts.sh desktop macos./kotlin test -m desktop./kotlin test -m macos./kotlin build -m ios -p iosSimulatorArm64dx build --package sample-minimal --platform android(wiped app dir)Before this merges
v1.11.1-ext.5must exist on96ae925f7fb6a730d7af31c2c29c856f35778d25, and the 1.11.1-ext.5 artifacts must be on Maven Central.ci.yml). Usesuites=all, or at leasttest,test_graalvm_renderer,test_kn_desktop_renderer,windows_static_consumer,test_native_renderer,test_compose_from_fork,test_windows_c:test_kn_desktop_renderer: the macOS and Linux Kotlin/Native renderers, including the newWheelScrollWindowTestandLinuxWheelScrollTestunder Xvfbwindows_static_kitandwindows_static_consumer: the mingw Compose build, the Windows static renderer, andcheck-windows-consumer.shwithfr13_windows_a_wheel_turned_forward_scrolls_toward_the_toptest_native_renderer: the Windows and static renderers on the new pinstest_graalvm_renderer: the GraalVM path, which should be unchangedtest_compose_from_fork,test_windows_c,testDraft: do not merge before both points above.