ozone/wayland: Restore pointer focus on tablet tool proximity out [chromium/src : main]

0 views
Skip to first unread message

The Techromancer (Gerrit)

unread,
Aug 5, 2026, 11:32:51 PM (7 days ago) Aug 5
to Thomas Anderson, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Thomas Anderson

The Techromancer added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
The Techromancer . resolved

This was a somewhat insidious bug I discovered while building darkly.art. Basically, after touching the window with the pen, mouse input would stop working for all of chrome, until you moved the cursor off of chrome and back in again.

Diagnosing it took more than a week and Claude Opus 5 proved useful for troubleshooting and fixing. I ran a full compile and tested with and without the fix.

I also added three tests. Two are regression tests that fail without the fix; the third is a sanity check that passes either way.

Thanks for your time on this

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Anderson
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I5c3adea8875264e1ff353f8e44773f626059374e
Gerrit-Change-Number: 8210119
Gerrit-PatchSet: 1
Gerrit-Owner: The Techromancer <techro...@darkly.art>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-CC: Kramer Ge <fang...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Comment-Date: Thu, 06 Aug 2026 03:32:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Anderson (Gerrit)

unread,
Aug 6, 2026, 11:06:17 AM (7 days ago) Aug 6
to The Techromancer, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from The Techromancer

Thomas Anderson voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • The Techromancer
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I5c3adea8875264e1ff353f8e44773f626059374e
Gerrit-Change-Number: 8210119
Gerrit-PatchSet: 1
Gerrit-Owner: The Techromancer <techro...@darkly.art>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-CC: Kramer Ge <fang...@chromium.org>
Gerrit-Attention: The Techromancer <techro...@darkly.art>
Gerrit-Comment-Date: Thu, 06 Aug 2026 15:06:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Anderson (Gerrit)

unread,
Aug 6, 2026, 11:06:56 AM (7 days ago) Aug 6
to The Techromancer, Thomas Lukaszewicz, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from The Techromancer and Thomas Lukaszewicz

Thomas Anderson voted and added 1 comment

Votes added by Thomas Anderson

Commit-Queue+1

1 comment

Patchset-level comments
Thomas Anderson . resolved

+tluk for secondary approval (fangzhoug is OOO)

Open in Gerrit

Related details

Attention is currently required from:
  • The Techromancer
  • Thomas Lukaszewicz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I5c3adea8875264e1ff353f8e44773f626059374e
Gerrit-Change-Number: 8210119
Gerrit-PatchSet: 1
Gerrit-Owner: The Techromancer <techro...@darkly.art>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-CC: Kramer Ge <fang...@chromium.org>
Gerrit-Attention: The Techromancer <techro...@darkly.art>
Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Comment-Date: Thu, 06 Aug 2026 15:06:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Lukaszewicz (Gerrit)

unread,
Aug 6, 2026, 2:46:01 PM (7 days ago) Aug 6
to The Techromancer, Chromium LUCI CQ, Thomas Anderson, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from The Techromancer

Thomas Lukaszewicz voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • The Techromancer
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5c3adea8875264e1ff353f8e44773f626059374e
    Gerrit-Change-Number: 8210119
    Gerrit-PatchSet: 1
    Gerrit-Owner: The Techromancer <techro...@darkly.art>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    Gerrit-CC: Kramer Ge <fang...@chromium.org>
    Gerrit-Attention: The Techromancer <techro...@darkly.art>
    Gerrit-Comment-Date: Thu, 06 Aug 2026 18:45:25 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Thomas Anderson (Gerrit)

    unread,
    Aug 6, 2026, 5:31:01 PM (6 days ago) Aug 6
    to The Techromancer, Thomas Lukaszewicz, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
    Attention needed from The Techromancer

    Thomas Anderson voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • The Techromancer
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5c3adea8875264e1ff353f8e44773f626059374e
    Gerrit-Change-Number: 8210119
    Gerrit-PatchSet: 1
    Gerrit-Owner: The Techromancer <techro...@darkly.art>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    Gerrit-CC: Kramer Ge <fang...@chromium.org>
    Gerrit-Attention: The Techromancer <techro...@darkly.art>
    Gerrit-Comment-Date: Thu, 06 Aug 2026 21:30:49 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Aug 6, 2026, 5:37:23 PM (6 days ago) Aug 6
    to The Techromancer, Thomas Lukaszewicz, Thomas Anderson, chromium...@chromium.org, Kramer Ge, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    ozone/wayland: Restore pointer focus on tablet tool proximity out

    WaylandTabletTool called into the pointer delegate with a null window on
    proximity out, clearing WaylandWindowManager's pointer focused window.
    The mouse never left the surface, so the compositor sends only
    wl_pointer.motion and no new wl_pointer.enter -- and wl_pointer.enter is
    the only thing that restores pointer focus. OnPointerMotionEvent,
    OnPointerFrameEvent and the pointer button path then all early-return on
    the null target, so mouse input stopped entirely, with the cursor frozen
    on its last shape, until the cursor physically left and re-entered the
    window or the tool re-entered proximity.

    Verified with WAYLAND_DEBUG under Sway: after zwp_tablet_tool_v2
    .proximity_out the compositor delivered 470 wl_pointer.motion events that
    were all ignored, and wl_pointer.set_cursor was never called again. No
    mid-session wl_pointer.leave was sent.

    Stylus tab dragging resolves its drag origin through the pointer focused
    window, so the tool must hold it while in proximity. Track the window
    wl_pointer last entered and hand focus back on proximity out instead of
    clearing it.

    Also gives OnTabletToolProximityOut a PointerDetails parameter, which it
    alone among the four tablet delegate methods lacked, so its exit event
    carries the tool's pointer type instead of defaulting to a mouse.

    R=thomasa...@chromium.org
    Fixed: 543182340
    Change-Id: I5c3adea8875264e1ff353f8e44773f626059374e
    Reviewed-by: Thomas Lukaszewicz <tl...@chromium.org>
    Reviewed-by: Thomas Anderson <thomasa...@chromium.org>
    Commit-Queue: Thomas Anderson <thomasa...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1675297}
    Files:
    • M ui/ozone/platform/wayland/host/wayland_event_source.cc
    • M ui/ozone/platform/wayland/host/wayland_event_source.h
    • M ui/ozone/platform/wayland/host/wayland_event_source_unittest.cc
    • M ui/ozone/platform/wayland/host/wayland_tablet_seat.cc
    • M ui/ozone/platform/wayland/host/wayland_tablet_tool.cc
    • M ui/ozone/platform/wayland/host/wayland_tablet_tool.h
    • M ui/ozone/platform/wayland/host/wayland_window_drag_controller_unittest.cc
    Change size: M
    Delta: 7 files changed, 120 insertions(+), 36 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Thomas Anderson, +1 by Thomas Lukaszewicz
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5c3adea8875264e1ff353f8e44773f626059374e
    Gerrit-Change-Number: 8210119
    Gerrit-PatchSet: 2
    Gerrit-Owner: The Techromancer <techro...@darkly.art>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages