Skip to content

fix: preserve Linux IDE dragging across renderer rebuilds - #40

Merged
medvednikov merged 1 commit into
masterfrom
fix/issue-24-20260919
Sep 19, 2026
Merged

medvednikov merged 1 commit into
masterfrom
fix/issue-24-20260919

Conversation

@medvednikov

Copy link
Copy Markdown
Member

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.

  • Preserve the original action identity even if another control covers the press point or a frame has no hit targets.
  • Route captured mouse moves/releases before menu interception, and clear capture before release callbacks.
  • Finish captured gestures on focus loss, suspension, and touch cancellation, without activating ordinary buttons.
  • Preserve scrollbar-drag priority.

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:

v test ui/ui_pointer_capture_immediate_test.v
v -check ide

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.v suite 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.

Keep clickable/draggable gesture targets until release or cancellation so Linux IDE resize handles continue receiving pointer events after moving.

Fixes #24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-19T14:17:55.158936Z 5b44cee PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/ui_immediate.c.v
Comment on lines +922 to +923
if captured.action_id.len > 0 {
fire_event(pointer_event_id('up', captured.action_id, x, y))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@medvednikov
medvednikov merged commit afecf21 into master Sep 19, 2026
0 of 10 checks passed
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.

IDE click-and-drag doesn't work on Linux

2 participants