mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
b1cadbdd76b2aa735701039d8c56d43c869cfb4d
Scroll events arrived at pointerQueue.Push and went through pointerOf + deliverEnterLeaveEvents + deliverEvent like Move/Press/Release. The side effect: every scroll created or updated a state.pointers entry, populated p.entered with whatever handlers sat under the wheel position, and overwrote state.cursor based on hit-test at the scroll position. When the platform layer reports scroll with a different PointerID than mouse-move events for the same physical mouse — which the Windows backend does (scrollEvent omits PointerID, defaulting to 0, while pointerUpdate forwards Windows' assigned ID) — the scroll spawns a phantom state.pointers entry. Subsequent moves go to the mouse's "real" entry, so the phantom never receives Leave events, its entered set never empties, and the cleanup at the end of Push keeps it alive. pointerQueue.Frame then runs hit-test for it every frame at the user's last scroll position, threading state.cursor through it after the live pointer's resolution and clobbering it with whatever's under the scroll position. The wheel is positional but isn't a pointer. Treating it as one is the bug. Hit-test inline at the scroll position to find delivery targets, dispatch via deliverEvent (which already handles filter matching, scroll axis clamping, and area-local position), and return without creating or updating a state.pointers entry. Add a router-level test that fails without the fix: a Move sets the cursor over a CursorPointer region, a subsequent Scroll over a CursorText region, and the test asserts the cursor is still CursorPointer. Pre-fix the scroll's deliverEnterLeaveEvents overwrites state.cursor with CursorText. Signed-off-by: Eugene <eugenebosyakov@gmail.com>
Gio - https://gioui.org
Immediate mode GUI programs in Go for Android, iOS, macOS, Linux, FreeBSD, OpenBSD, Windows, and WebAssembly (experimental).
Installation, examples, documentation
Go to gioui.org.
Issues
File bugs and TODOs through the issue tracker or send an email to ~eliasnaur/gio@todo.sr.ht. For general discussion, use the mailing list: ~eliasnaur/gio@lists.sr.ht.
Contributing
Post discussion to the mailing list and patches to gio-patches. No Sourcehut account is required and you can post without being subscribed.
See the contribution guide for more details.
An official GitHub mirror is available.
Tags
Pre-1.0 tags are provided for reference only, and do not designate releases with ongoing support. Bugfixes will not be backported to older tags.
Tags follow semantic versioning. In particular, as the major version is zero:
- breaking API or behavior changes will increment the minor version component.
- non-breaking changes will increment the patch version component.
Description
Languages
Go
89.6%
C
7%
Java
1.7%
Objective-C
1.6%