Skip to content

Accumulated touch fixes draft#98

Draft
moWerk wants to merge 1 commit into
AsteroidOS:masterfrom
moWerk:qt6-touch-fix
Draft

Accumulated touch fixes draft#98
moWerk wants to merge 1 commit into
AsteroidOS:masterfrom
moWerk:qt6-touch-fix

Conversation

@moWerk

@moWerk moWerk commented May 14, 2026

Copy link
Copy Markdown
Member

Collecting touch fix relevant commits before crafting a pr message.

- In Qt5, the Wayland platform set the root QQuickItem dimensions synchronously before QML evaluation, so anchors.fill: parent on Application_p correctly resolved to the screen size at startup
- In Qt6, the Wayland xdg_toplevel configure handshake is asynchronous and the QQuickWindow geometry arrives after QML component completion, leaving Application_p at 0x0 until a layout pass occurs
- This caused LayerStack to calculate sub-page x positions as depth * 0 = 0 at push() time, stacking all pages at the origin with no slide animation, and the FlatMesh tutorial off-screen positions to resolve to 0 instead of the screen width
- Fix: override itemChange in Application_p to detect ItemSceneChange and immediately call setWidth/setHeight from the QQuickWindow dimensions, then stay connected to widthChanged and heightChanged for any subsequent resize
- The initial ItemSceneChange fires before the window is sized (0x0), so the guard w->width() > 0 skips that first call; the widthChanged signal fires moments later with the correct 321x321 geometry and the size is applied then
- Diagnosed via Component.onCompleted logging in asteroid-settings confirming Application width reported as 0 at startup, and itemChange qDebug output confirming the two-phase size arrival sequence on sparrow
- Confirmed on sparrow (catfish TicWatch Pro 2020): LayerStack sub-pages now animate in correctly with the slide transition
@moWerk moWerk marked this pull request as draft May 14, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant