Skip to content

surface_input has no pointer enter/leave, so a producer cannot clear hover state #5

Closed

Description

@Vanuan

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

The gateway reports moves, downs and ups; nothing tells a producer that the pointer left the surface. A viewport that highlights on hover (a gizmo handle, a navigation-cube face, a cursor hint) cannot clear that state except by guessing from a move's position — and on leave there may be no further move inside the surface at all.

GPUI already has the transition: on_hover(|hovered: &bool, ..) (bite-gp-authoring/src/elements/div.rs:1661), which fires on both edges.

Suggested:

SurfaceEvent::PointerEnter { modifiers: SurfaceModifiers },
SurfaceEvent::PointerLeave { modifiers: SurfaceModifiers },

delivered from an on_hover listener registered in attach() alongside the pointer ones. No position: the event says the pointer came or went, not where it is.

We carry this in a vendored copy.

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 60fb085 (PR #6). PointerEnter and PointerLeave are emitted from on_hover; the engine hover suppression during a press or drag is documented on the variants.

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