Skip to content

Linux engine: drag_handle into Chromium gets neither the atomic press nor the press watch, so a lost press answers success #250

Closed

Description

@SSFSKIM

Gap

On cua's Linux engine, drag_handle (the split drag: start, move, end as separate requests) gets neither of #171 M3's Chromium protections: the atomic press and the press watch.

A drag_handle into a Chromium window can therefore lose its press to a stray real-pointer event, or to Chrome's own capture-grab crossing when the person's pointer is outside the window (#248). It then answers success, with nothing dragged and possibly a click delivered. The single-request drag answers the "may not have started the drag" error in the same situation.

Constraints

  • The atomic press needs the samples through 4 px in the same request as the press. drag_handle's start knows only the start point.
  • The watch could still span start → end, with end answering the error. Alternatively, start could send a 4 px step toward the first move only once it is known (at move).
  • Same device-mode rules as drag: shared mode answers the error, dedicated mode takes the foreground route when the pointer is outside.

Proof

#171 M3's task-20 harness cases for drag_handle: undisturbed (0 false errors over at least 100), a nudge in the press window, and the pointer parked outside, in both modes.

Spawned by #171 (M3, task 20).

Activity

  1. added
    bug
    status:ready-for-architect
    priority:P2
    on Nov 1, 2026
  2. added a commit that references this issue on Nov 1, 2026
  3. SSFSKIM commented on Nov 4, 2026

    @SSFSKIM
    OwnerAuthor

    Scope added from #171 M4 T7b (2026-11-04, the design session): a pointer button held at the engine's exit. T7b makes every exit except SIGKILL release held input first, but it deliberately leaves buttons 1-3 down, as 0.3.0 does. That covers drag_handle's cross-request hold between start and end, and a drag cut mid-request by a forced exit. Releasing at once would drop a drag in flight wherever the pointer happens to be, an effect nobody asked for. So T17's drag_handle lifecycle should cover the exit case too: cancel, then release. Lead: at engine start, XI2 can read the XTEST slave pointer's button state, which shows a hold a previous engine left behind. Where such a hold can exist at all (XTEST, dedicated mode) is being confirmed in T7b's closing report.

  4. SSFSKIM commented on Nov 4, 2026

    @SSFSKIM
    OwnerAuthor

    Correction to the comment above (the design session, 2026-11-04). The premise was wrong. The desktop route uses XTEST in both modes, so drag_handle holds button 1 on a shared display too (pointer.rs drag_handle; engine/way.rs route_along maps a windowless request to the desktop route with no mode check). T7b therefore releases buttons 1-3 at every exit except SIGKILL. A drag in flight at exit ends where the pointer is: the model's last move_to point, or the person's pointer if they moved it. T17 refines this. Leads: (1) cancel, then release, but an Escape sent through XTEST goes to the focused window, which on a shared display may be the person's; (2) move back to the drag's origin, then release, which undoes rather than commits most drags (a selection, a slider, a DnD dropped on its own source).

  5. added 20 commits that reference this issue on Nov 5, 2026
  6. removed
    status:ready-for-architect
    on Nov 14, 2026
  7. SSFSKIM commented on Nov 14, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Landed via PR #380 (78b4959, cua 0.28.0, linux-engine-v0.4.0)

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:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions