build(shell): name Crafter.Graphics at a commit of its master, and answer a compositor's resize with a frame
The app was built against a checkout of Crafter.Graphics given with --graphics=, because the text-input purposes it asks the input method for were uncommitted work in one checkout. They are on Crafter.Graphics' master since a9ce1a0, so project.cpp names the library as a GitProject at that commit, as it names Crafter.Network and Crafter.DB. --graphics= is gone, and with it $NOSTRO_GRAPHICS in build-aarch64.sh and the workflow's step that cloned the branch claude/nostro-app, which the forge never had: neither job of the workflow could have built the app. That master also has 89111e0, which the window was not written against. A size the compositor configures is no longer taken in the configure's listener. The listener keeps it and fires onFrameOwed, and the next Render() makes the swapchain again, fires onResize from inside itself, and answers the configure with that frame's buffer. The window draws on demand, so: - Shell::Window asks for a frame from onFrameOwed. Without it nothing draws the frame that answers the configure, and the window keeps its old size until something else changes on it. - Canvas::Reconcile no longer turns the compositor's sizes into Resize(pixels). The library takes the size asked for last, whoever asked, so that call took the configured size's place, and with it came back the surface a dp larger than configured that 89111e0 had ended (Crafter.Graphics #201). It now sizes the window only where the library does not: the app's own size (--size, SetSize, --scale); the size that comes with a new window (#166), handed over in deferredLogicalWidth, where the library's listener keeps every later one; and a scale the display changes to by itself (#165), through RebuildSwapchain. The last two reach into the library's own state, and go once the library does them. The text-input API on master is the one the app was written against: nothing changed there. Looked at on 2026-11-20 on the made-up system, on a desktop (KWin at a scale of 1.85), with WAYLAND_DEBUG=1 on the app: - The accounts at 420x760: the start, and resize:600,800 from --poke, the app's own size. Each size reaches the surface once, with the first buffer drawn for it. - The same window given 760x532 by the compositor (a KWin script that sets its frameGeometry): the configure is kept, a frame is asked for, and set_destination(760, 532), the acknowledgement and the first buffer of 1406x985 go out together. A temporary probe had that frame's draw list reach 1406x985: it is laid out for the new size. - 421x761, whose pixels at 1.85 are no whole number: it opens as 422x762, since the app's own size goes through Resize in pixels. The notes say so. - --scale 2 --size 360x760, the cards and the pay form filled in from --poke, with resize:400,700: the compositor's sizes are passed over. - The --debug-api build driven with crafter-debug: Window_Resize, Ui_Tap, ui.texts and a screenshot. The two paths that are a phone's, a size in the first configure and a scale named after the first frames, were tried only with the values put in by hand in a temporary probe. Nothing was looked at on a phone, and what the input method is told was not read off the wire: the test window never had the keyboard. 17 tests pass and the four lint passes report nothing. The app, its --debug-api build, the fake system, the x86_64 Flatpak bundle and both aarch64 Flatpaks (build-aarch64.sh) build. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
490ea995e4
commit
3cf9e091a9
8 changed files with 94 additions and 89 deletions
|
|
@ -27,9 +27,6 @@ name: Flatpak
|
|||
# - The repository is public by the time a tag is pushed: the release checks read the forge without a login, and a
|
||||
# private repository answers them with a 404.
|
||||
# - The runner's config has to allow the four volumes of `publish`, of which crafter-flatpak-nostro-cache is new.
|
||||
# - The app is built against a Crafter.Graphics checkout for as long as project.cpp takes one (--graphics=): the
|
||||
# branch $GRAPHICS_REF has to be on the forge. Once project.cpp names Crafter.Graphics at a commit itself, the
|
||||
# step that fetches it goes, and $NOSTRO_GRAPHICS with it.
|
||||
#
|
||||
# Crafter.Build's, Crafter.Review's and imsd-messages' workflows publish into the same repository: each holds
|
||||
# /var/www/flatpak/.publish.lock while it commits and updates the summary, and so does this one.
|
||||
|
|
@ -60,10 +57,6 @@ env:
|
|||
REPO_DIR: /srv/flatpak/repo
|
||||
# A release tag carries a signature Forgejo verifies for this address.
|
||||
RELEASE_SIGNER: jorijnvdgraaf@catcrafts.net
|
||||
# The Crafter.Graphics the app is built against: see the head of this file.
|
||||
GRAPHICS_URL: https://forgejo.catcrafts.net/Catcrafts/Crafter.Graphics.git
|
||||
GRAPHICS_REF: claude/nostro-app
|
||||
GRAPHICS_DIR: /home/build/Crafter.Graphics
|
||||
|
||||
jobs:
|
||||
check:
|
||||
|
|
@ -119,21 +112,11 @@ jobs:
|
|||
# environment until Crafter.Build's issue #46 is fixed (AGENTS.template.md, Code style).
|
||||
run: runuser -u build -- flatpak run --env=CPLUS_INCLUDE_PATH=/app/include/c++/v1 "$CRAFTER_REF" lint --banks=bunq
|
||||
|
||||
- name: Crafter.Graphics
|
||||
run: |
|
||||
set -eu
|
||||
rm -rf "$GRAPHICS_DIR"
|
||||
if ! runuser -u build -- git clone --quiet --depth 1 --branch "$GRAPHICS_REF" "$GRAPHICS_URL" "$GRAPHICS_DIR"; then
|
||||
echo "no $GRAPHICS_REF at $GRAPHICS_URL: the app is built against it, see the head of .forgejo/workflows/flatpak.yaml" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Crafter.Graphics $(git -C "$GRAPHICS_DIR" rev-parse HEAD)"
|
||||
|
||||
- name: Sysroot
|
||||
run: runuser -u build -- packaging/flatpak/make-aarch64-sysroot.sh
|
||||
|
||||
- name: Build
|
||||
run: runuser -u build -- env NOSTRO_GRAPHICS="$GRAPHICS_DIR/project.cpp" packaging/flatpak/build-aarch64.sh repo "$BRANCH"
|
||||
run: runuser -u build -- packaging/flatpak/build-aarch64.sh repo "$BRANCH"
|
||||
|
||||
publish:
|
||||
if: github.event_name == 'push'
|
||||
|
|
@ -197,16 +180,6 @@ jobs:
|
|||
# Against the fake bunq and the fake system bus the tests bring: no bank and no system bus is reached.
|
||||
run: runuser -u build -- flatpak run "$CRAFTER_REF" test --banks=bunq
|
||||
|
||||
- name: Crafter.Graphics
|
||||
run: |
|
||||
set -eu
|
||||
rm -rf "$GRAPHICS_DIR"
|
||||
if ! runuser -u build -- git clone --quiet --depth 1 --branch "$GRAPHICS_REF" "$GRAPHICS_URL" "$GRAPHICS_DIR"; then
|
||||
echo "no $GRAPHICS_REF at $GRAPHICS_URL: the app is built against it, see the head of .forgejo/workflows/flatpak.yaml" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Crafter.Graphics $(git -C "$GRAPHICS_DIR" rev-parse HEAD)"
|
||||
|
||||
- name: Sysroot
|
||||
run: runuser -u build -- packaging/flatpak/make-aarch64-sysroot.sh
|
||||
|
||||
|
|
@ -214,7 +187,7 @@ jobs:
|
|||
# repo is made anew, as dist is below: root bundles and publishes from it.
|
||||
run: |
|
||||
rm -rf repo
|
||||
runuser -u build -- env NOSTRO_GRAPHICS="$GRAPHICS_DIR/project.cpp" packaging/flatpak/build-aarch64.sh repo "$BRANCH"
|
||||
runuser -u build -- packaging/flatpak/build-aarch64.sh repo "$BRANCH"
|
||||
|
||||
- name: Bundle
|
||||
# dist is made anew: the release carries every file in it, and a checkout can bring a dist of its own, or a
|
||||
|
|
|
|||
Loading…
Reference in a new issue