Skip to content

Linux engine: the Gecko pointer watch's second check stops one round trip after the events, so a pointer that leaves before a later re-read is not caught #362

Open

Description

@SSFSKIM

Since #353 (#171 M4 T19), every background click, scroll, move and drag into Firefox is sent only while the real pointer is in its window. It is then checked again: the engine reads the LeaveNotify watch and QueryPointer at a round trip after the events went out, and answers 'may not have taken' if the pointer left, never ok.

The check covers a pointer that leaves before that round trip ends. It does not cover Gecko re-reading the pointer later, for instance on a frame or when its event loop gets to a queued event. A person's motion out of the window in that later span could leave a request answered ok that Gecko dropped.

This was not observed: the :0 and private manifests saw 0 ok-with-no-effect in 80 leave runs (docs/evidence/2026-10-28-own-linux-engine/m4/pointer-route/, feat/171-m4-t19 e47fc1e). But the leave cases move the pointer at fixed offsets of 0 to 50 ms, which don't map the window.

What would close it: measure Gecko's re-read time, the latest delay after the events at which a leave still drops the input, idle and at 2x, with a leave sweep at increasing offsets. Then either extend the second check past that bound with a margin, pricing the added latency per Gecko pointer request against the vendor's timings, or record the measured bound as the stated limit.

Acceptance: the bound measured with its sweep, and either a 0 ok-with-no-effect leave sweep out to the bound plus margin at both loads with the latency cost stated, or the bound in the engine README and the deviations.

Related: #353, #171.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    on Nov 10, 2026
  2. SSFSKIM commented on Nov 10, 2026

    @SSFSKIM
    OwnerAuthor

    Related cost from T19's fix wave (ca126e8..2acc805): the 'may not have taken' leave answer is mostly a false alarm for clicks and scrolls. In the leave cases, 19 of 20 clicks and 20 of 20 scrolls took, because Gecko had handled them before the pointer left inside the watch window; the selection drag was really lost 20 of 20. It is honest (never claims success) but costs the caller a re-read. Narrowing it needs the same measurement this ticket asks for: when Gecko has finished handling a request relative to the events. Whoever measures #362's bound should also price narrowing the alarm for click and scroll (e.g. answering ok when the pointer left only after Gecko's handling point).

  3. SSFSKIM commented on Nov 12, 2026

    @SSFSKIM
    OwnerAuthor

    Related limit from M4's T18 (2026-11-12): Firefox's own HTML5 drag and drop starts with GTK's drag-source pointer grab, which sends the target a LeaveNotify in mode GRAB (an UNGRAB enter follows ~100-120 ms later) although the real pointer never moves. The leave watch now ignores a GRAB-mode leave of the target when the target's own X client took XdndSelection during the same request (a Normal leave, or another client's grab, still answers 'left'; the end QueryPointer read and the pre-request refusal are unchanged). Consequence: a person's pointer that leaves and returns during Gecko's own drag grab goes unseen, because crossings go only to the grabbing client; one that stays out is caught by the end read.

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

    bugpriority:P3status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions