Skip to content

surface_input drops MouseDownEvent::click_count, so a producer cannot see a double-click #4

Closed

Description

@Vanuan

Crate: gpui_interop 0.1.3 and 0.2.0 (src/input.rs).

SurfaceEvent::PointerDown carries position, button and modifiers (src/input.rs:124-128), while GPUI's MouseDownEvent also has click_count: usize (bite-gp-types/src/input.rs:83-87) — computed per platform, and by the browser's own time/distance heuristic (bite-gp-web/src/events.rs:128-144).

A CAD consumer needs it: a single click selects a face, a double click opens the feature (FerroCAD's viewport switches on click_count today). Without it, a producer re-implements click counting from timestamps and positions — exactly the kind of platform detail the gateway exists to absorb.

Suggested: add click_count: usize to PointerDown (and consider it on PointerUp for symmetry). One field copied from the event.

We carry this in a vendored copy and use it for double-click-to-recentre.

Status (0.2.0, 2026-11-03): unchanged — src/input.rs is byte-identical
between 0.1.3 and 0.2.0, and the patch described here still applies
unchanged.

Activity

  1. Vanuan commented on Nov 3, 2026

    @Vanuan
    ContributorAuthor

    Fixed in 6ed9e91 (PR #6). PointerDown and PointerUp now carry the platform click_count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions