exo: Pointer::OnSurfaceCommit can set hotspot to an incorrect value |
||||||||||
Issue descriptionThe Wayland call sequence: wl_pointer_set_cursor(..., pointer_surface, hotspot_x, hotspot_y) // And then shortly after wl_surface_commit(pointer_surface) ends up ignoring the passed hotspot_x/y values, and instead sets some prior hotspot coordinate. Both calls end up starting an asynchronous pointer surface snapshot, passing along the hotspot value to use. The first call requests a snapshot with the correct hotspot coordinates. However if the second call is made before the snapshot actually completes, it ends up using whatever hotspot coordinates where last set by the most recent snapshot that did complete.
,
Aug 29 2017
,
Aug 29 2017
This bug requires manual review: Less than 3 days to go before AppStore submit on M61 Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), ketakid@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 29 2017
lpique@, please provide the rationale as to why this change needs to be merged into the release branch. How risky is this and how would the users be impacted if we don't merge this?
,
Aug 29 2017
,
Aug 29 2017
This should be a low risk bug fix, needed as part of solving long-standing issues setting the pointer/mouse cursor in ARC++. It goes along with another non-Chromium change to fix the displayed image. b/37641315 documents the Android side issue. The changes impact a Wayland interface primarily used by ARC++, though it would affect any other code that does use the same interface. The code here is only built by default for Chrome OS. This change fixes an issue with the hotspot set for the cursor, which was obviously wrong after applying the other patch when trying to drag the border of an Android window to resize it. The other patch is necessary to prevent the cursor from sometimes being invisible in Android apps under certain conditions (most easily reproduced after letting it fade out by not using it for a little while), and I believe the same issue is causing the cursor to appear as a black square at other (much harder to reproduce) times. We do have an option if we cannot land this change of adding a small workaround in the Android code for 61. But it was a small enough bug fix to the Chromium code that it seemed best to fix there and cherry-pick to 61.
,
Aug 29 2017
And I just realized this bug was tagged as a iOS bug and not a Chrome OS bug. Sorry!
,
Aug 29 2017
This change only affects ChromeOS devices running Android apps. Safe merge imo.
,
Aug 30 2017
Approving merge to M61.
,
Aug 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/32e58e42435c2abd48e7ae317bfbbfc2a5eed94d commit 32e58e42435c2abd48e7ae317bfbbfc2a5eed94d Author: David Reveman <reveman@chromium.org> Date: Thu Aug 31 19:44:08 2017 exo: Pointer::OnSurfaceCommit() should set the last hotspot If a call is made to wl_pointer_set_cursor() to set a new surface and corresponding hotspot, follow shortly thereafter by a call to wl_surface_commit() to commit changes to the surface to use as the pointer shape, the hotspot ended up being set to an old hotspot value. Both calls make an asynchronous call to take a snapshot of the pointer surface, which takes the hotspot to set. The second call appears to cause the first snapshot operation to be aborted before completing, otherwise it would make sense to have the commit call not even set the hotspot. Instead the call to set the cursor now store the hotspot that would have been set, and the commit call will use that value. This does result in the correct hotspot being set. TBR=lpique@chromium.org (cherry picked from commit 9f25075ba35f2d463af614fa4d88d632c9f29361) Bug: 759856 , b:65096873 Change-Id: Iec69b0f138bb81f2da5ea9ecc2b9ff8739b02785 Reviewed-on: https://chromium-review.googlesource.com/639025 Commit-Queue: Lloyd Pique <lpique@chromium.org> Reviewed-by: David Reveman <reveman@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#498185} Reviewed-on: https://chromium-review.googlesource.com/644139 Cr-Commit-Position: refs/branch-heads/3163@{#1039} Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528} [modify] https://crrev.com/32e58e42435c2abd48e7ae317bfbbfc2a5eed94d/components/exo/pointer.cc [modify] https://crrev.com/32e58e42435c2abd48e7ae317bfbbfc2a5eed94d/components/exo/pointer.h
,
Aug 31 2017
,
Jan 22 2018
,
Jan 23 2018
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by bugdroid1@chromium.org
, Aug 29 2017