Wayland: defer pointer release on focus loss until end of frame [chromium/src : main]

1 view
Skip to first unread message

Thomas Anderson (Gerrit)

unread,
Apr 9, 2026, 10:49:34 PMApr 9
to Mitchell Cohen, Kramer Ge, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Kramer Ge and Mitchell Cohen

Thomas Anderson added 2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Thomas Anderson . resolved

+Kramer for review

File ui/ozone/platform/wayland/host/wayland_window_unittest.cc
Line 4595, Patchset 3 (Parent): // Leaving will trigger a synthesized release event on focus change.
Thomas Anderson . unresolved

is this removed intentionally?

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
  • Mitchell Cohen
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: I55f0ec1a6b35b89cb387c8dc506cdfb1ab64b8aa
Gerrit-Change-Number: 7746265
Gerrit-PatchSet: 3
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Fri, 10 Apr 2026 02:49:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Apr 9, 2026, 11:47:06 PMApr 9
to Kramer Ge, Thomas Anderson, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Kramer Ge and Thomas Anderson

Mitchell Cohen added 1 comment

File ui/ozone/platform/wayland/host/wayland_window_unittest.cc
Line 4595, Patchset 3 (Parent): // Leaving will trigger a synthesized release event on focus change.
Thomas Anderson . unresolved

is this removed intentionally?

Mitchell Cohen

Yes. I added that comment in the original CL to explain the extra event, which will no longer show up in this test.

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
  • Thomas Anderson
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: I55f0ec1a6b35b89cb387c8dc506cdfb1ab64b8aa
Gerrit-Change-Number: 7746265
Gerrit-PatchSet: 3
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Fri, 10 Apr 2026 03:46:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Anderson <thomasa...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Anderson (Gerrit)

unread,
Apr 13, 2026, 11:52:18 AMApr 13
to Mitchell Cohen, Kramer Ge, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Kramer Ge and Mitchell Cohen

Thomas Anderson voted and added 1 comment

Votes added by Thomas Anderson

Code-Review+1

1 comment

File ui/ozone/platform/wayland/host/wayland_window_unittest.cc
Line 4595, Patchset 3 (Parent): // Leaving will trigger a synthesized release event on focus change.
Thomas Anderson . resolved

is this removed intentionally?

Mitchell Cohen

Yes. I added that comment in the original CL to explain the extra event, which will no longer show up in this test.

Thomas Anderson

Acknowledged

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
  • Mitchell Cohen
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: I55f0ec1a6b35b89cb387c8dc506cdfb1ab64b8aa
Gerrit-Change-Number: 7746265
Gerrit-PatchSet: 4
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Mon, 13 Apr 2026 15:52:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Thomas Anderson <thomasa...@chromium.org>
Comment-In-Reply-To: Mitchell Cohen <mitc...@agilebits.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kramer Ge (Gerrit)

unread,
Apr 13, 2026, 12:52:52 PMApr 13
to Mitchell Cohen, Thomas Anderson, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Mitchell Cohen

Kramer Ge voted and added 1 comment

Votes added by Kramer Ge

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Kramer Ge . resolved

LGTM, is the compositor sending `leave` and `enter` within the same `frame`?

Potentially an opportunity to systematically avoid it. as a rule of thumb we ought to accumulate `wl_pointer` events (motion, button, axis) as they are received and only process them as a single logical input update when the `wl_pointer.frame` event is received.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitchell Cohen
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: I55f0ec1a6b35b89cb387c8dc506cdfb1ab64b8aa
    Gerrit-Change-Number: 7746265
    Gerrit-PatchSet: 4
    Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Attention: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Comment-Date: Mon, 13 Apr 2026 16:52:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Mitchell Cohen (Gerrit)

    unread,
    Apr 13, 2026, 2:42:00 PMApr 13
    to Thomas Anderson, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

    Mitchell Cohen added 1 comment

    Patchset-level comments
    Kramer Ge . resolved

    LGTM, is the compositor sending `leave` and `enter` within the same `frame`?

    Potentially an opportunity to systematically avoid it. as a rule of thumb we ought to accumulate `wl_pointer` events (motion, button, axis) as they are received and only process them as a single logical input update when the `wl_pointer.frame` event is received.

    Mitchell Cohen

    I believe the events arrive in the same frame but didn't verify. However this approach should do the right thing even if there are two frames. I actually had your idea in mind (as it's mentioned in to https://wayland-book.com/seat/pointer.html). I'd love to try moving all pointer processing to the end of frame in a followup, it might also help with window dragging.

    Open in Gerrit

    Related details

    Attention set is empty
    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: I55f0ec1a6b35b89cb387c8dc506cdfb1ab64b8aa
    Gerrit-Change-Number: 7746265
    Gerrit-PatchSet: 4
    Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Comment-Date: Mon, 13 Apr 2026 18:41:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Kramer Ge <fang...@chromium.org>
    satisfied_requirement
    open
    diffy

    Mitchell Cohen (Gerrit)

    unread,
    Apr 14, 2026, 2:57:17 PMApr 14
    to Thomas Anderson, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

    Mitchell Cohen voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention set is empty
    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: I55f0ec1a6b35b89cb387c8dc506cdfb1ab64b8aa
    Gerrit-Change-Number: 7746265
    Gerrit-PatchSet: 5
    Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Comment-Date: Tue, 14 Apr 2026 18:57:10 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    chromium-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

    unread,
    Apr 14, 2026, 5:59:07 PMApr 14
    to Mitchell Cohen, Kramer Ge, Thomas Anderson, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

    chromiu...@luci-project-accounts.iam.gserviceaccount.com submitted the change

    Unreviewed changes

    4 is the latest approved patch-set.
    No files were changed between the latest approved patch-set and the submitted one.

    Change information

    Commit message:
    Wayland: defer pointer release on focus loss until end of frame

    Fixes a regression which prevented context menus from working if the
    mouse is held down to open the menu and released to select an option.
    Bug: 500653052
    Change-Id: I55f0ec1a6b35b89cb387c8dc506cdfb1ab64b8aa
    Reviewed-by: Thomas Anderson <thomasa...@chromium.org>
    Commit-Queue: Mitchell Cohen <mitc...@agilebits.com>
    Reviewed-by: Kramer Ge <fang...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1614731}
    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_window_unittest.cc
    Change size: M
    Delta: 4 files changed, 109 insertions(+), 7 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Kramer Ge, +1 by Thomas Anderson
    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: I55f0ec1a6b35b89cb387c8dc506cdfb1ab64b8aa
    Gerrit-Change-Number: 7746265
    Gerrit-PatchSet: 6
    Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Mitchell Cohen <mitc...@agilebits.com>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages