fix: preserve Linux IDE dragging across renderer rebuilds - #40
Conversation
Keep clickable/draggable gesture targets until release or cancellation so Linux IDE resize handles continue receiving pointer events after moving. Fixes #24
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b44ceeae1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if captured.action_id.len > 0 { | ||
| fire_event(pointer_event_id('up', captured.action_id, x, y)) |
There was a problem hiding this comment.
Do not convert pointer cancellation into a completed release
When a captured custom view loses focus, is suspended, or receives touches_cancelled, this emits the same pointer:up event as a successful gesture. Consumers cannot distinguish cancellation and may commit user actions: examples/circle_drawer/main.v adds or selects a circle on every canvas pointer:up, and ide/main.v places an armed component when the form surface receives one. Thus merely switching windows or an OS touch cancellation after pressing these views can activate them; cancellation needs a distinct abort path rather than a normal release event.
Useful? React with 👍 / 👎.
Fixes #24.
Changes
Capture a clickable/draggable view's original pointer target on press and keep it for drag/release events. Previously, each move re-hit-tested the original press coordinates against the newly rebuilt element tree, so moving a small IDE resize handle away from those coordinates stopped the gesture.
Add five event-level regression tests for moving resize handles, capture reset between gestures, focus loss and late releases, ordinary-button cancellation, and scrollbar precedence.
Verification
Passed with V 0.5.2 on Linux:
The new pointer-capture tests passed on the Linux verification runner. They were also compiled and executed locally with GCC and the Linux development headers; the IDE type-check passed locally.
The broader
ui/ui_scroll_immediate_test.vsuite fails to compile because of undefined global identifiers. This also reproduces against the original renderer and is not reported as passing. The shared verification job stopped at that existing failure, after the new capture tests passed.Manual interactive GUI verification has not been performed. This PR contains only the renderer change and regression tests; no temporary verification workflow is included.