Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Issue 902123002: Fix initial hiding and centering cursor on Ozone (Closed)

Created:
5 years, 10 months ago by pkotwicz
Modified:
5 years, 9 months ago
Reviewers:
Jun Mukai, oshima
CC:
chromium-reviews, kalyank, sadrul, dnicoara
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix initial hiding and centering cursor on ChromeOS DisplayController::UpdateMouseLocationAfterDisplayChange() is now called during startup: - In Ozone once a channel to the GPU has been established - In X11 as a result of DisplayChangeObserver::OnTouchscreenDeviceConfigurationChanged() Moving the mouse on startup: - Causes side effects such as mouse hover - Causes a mouse event to be generated which causes CompoundEventFilter::SetCursorVisibilityOnEvent() to show the mouse cursor. This CL makes DisplayController::UpdateMouseLocationAfterDisplayChange() move the mouse only if necessary. BUG=450860 TEST=Manual, see bug Committed: https://crrev.com/04bbbd5582af60920656cc9768d2ac4e03709b69 Cr-Commit-Position: refs/heads/master@{#318708}

Patch Set 1 : #

Total comments: 5

Patch Set 2 : #

Total comments: 5

Patch Set 3 : #

Total comments: 5

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -14 lines) Patch
M ash/display/display_controller.h View 1 2 3 4 1 chunk +9 lines, -3 lines 0 comments Download
M ash/display/display_controller.cc View 1 2 3 4 4 chunks +41 lines, -11 lines 0 comments Download

Messages

Total messages: 58 (20 generated)
pkotwicz
Oshima PTAL https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc File ash/display/display_controller.cc (right): https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc#newcode541 ash/display/display_controller.cc:541: if (!aura::Env::GetInstance()->mouse_moved() && I am unsure whether ...
5 years, 10 months ago (2015-02-06 16:12:44 UTC) #3
pkotwicz
Ping!
5 years, 10 months ago (2015-02-10 16:57:18 UTC) #4
pkotwicz
Ping!
5 years, 10 months ago (2015-02-10 16:57:19 UTC) #5
oshima
https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc File ash/display/display_controller.cc (right): https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc#newcode592 ash/display/display_controller.cc:592: dst_root_window->MoveCursorTo(target_location_in_native); This was added to make sure that X ...
5 years, 10 months ago (2015-02-10 22:01:57 UTC) #6
pkotwicz
Hi Oshima, can you please take another look? Sorry for the delay https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc File ash/display/display_controller.cc ...
5 years, 10 months ago (2015-02-12 01:52:56 UTC) #7
oshima
https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc File ash/display/display_controller.cc (right): https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc#newcode592 ash/display/display_controller.cc:592: dst_root_window->MoveCursorTo(target_location_in_native); On 2015/02/12 01:52:55, pkotwicz wrote: > This bug ...
5 years, 10 months ago (2015-02-12 02:08:57 UTC) #8
pkotwicz
https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc File ash/display/display_controller.cc (right): https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc#newcode592 ash/display/display_controller.cc:592: dst_root_window->MoveCursorTo(target_location_in_native); How do you suggest fixing this bug on ...
5 years, 10 months ago (2015-02-12 02:37:41 UTC) #9
oshima
On 2015/02/12 02:37:41, pkotwicz wrote: > https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc > File ash/display/display_controller.cc (right): > > https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc#newcode592 > ...
5 years, 10 months ago (2015-02-12 19:11:13 UTC) #10
spang
On 2015/02/12 19:11:13, oshima wrote: > On 2015/02/12 02:37:41, pkotwicz wrote: > > > https://codereview.chromium.org/902123002/diff/20001/ash/display/display_controller.cc ...
5 years, 10 months ago (2015-02-13 15:33:44 UTC) #11
pkotwicz
I got stuck. I tried making DisplayController::EnsurePointerInDisplays() only called in X11 and making ozone handle ...
5 years, 10 months ago (2015-02-13 17:13:27 UTC) #12
oshima
On 2015/02/13 17:13:27, pkotwicz wrote: > I got stuck. I tried making DisplayController::EnsurePointerInDisplays() only > ...
5 years, 10 months ago (2015-02-13 23:34:04 UTC) #13
pkotwicz
mukai@, can you please take a preliminary look? (oshima@ seems to be OOO) This seems ...
5 years, 10 months ago (2015-02-18 21:56:41 UTC) #17
Jun Mukai
On 2015/02/18 21:56:41, pkotwicz wrote: > mukai@, can you please take a preliminary look? (oshima@ ...
5 years, 10 months ago (2015-02-18 23:14:06 UTC) #18
Jun Mukai
oops, there's a comment as well. https://codereview.chromium.org/902123002/diff/80001/ash/display/display_controller.cc File ash/display/display_controller.cc (right): https://codereview.chromium.org/902123002/diff/80001/ash/display/display_controller.cc#newcode587 ash/display/display_controller.cc:587: ::wm::ConvertPointToScreen(dst_root_window, &target_location_in_root); &target_location_in_screen? ...
5 years, 10 months ago (2015-02-18 23:14:21 UTC) #19
pkotwicz
mukai@ can you please take another look? Yes, EnsurePointerInDisplays() is called on startup. https://codereview.chromium.org/902123002/diff/80001/ash/display/display_controller.cc File ...
5 years, 10 months ago (2015-02-19 01:01:17 UTC) #20
Jun Mukai
Sorry if it's already discussed, but can we -- - initialize aura::Env::last_cursor_location to some extreme ...
5 years, 10 months ago (2015-02-19 01:50:06 UTC) #21
pkotwicz
We actually have the problem of calling EnsurePointerInDisplays() during intiialization on both X11 and Ozone. ...
5 years, 10 months ago (2015-02-19 02:43:43 UTC) #22
Jun Mukai
https://codereview.chromium.org/902123002/diff/100001/ash/display/display_controller.cc File ash/display/display_controller.cc (right): https://codereview.chromium.org/902123002/diff/100001/ash/display/display_controller.cc#newcode585 ash/display/display_controller.cc:585: #if defined(USE_OZONE) On 2015/02/19 02:43:43, pkotwicz wrote: > Ozone ...
5 years, 10 months ago (2015-02-19 02:57:24 UTC) #23
pkotwicz
I am not sure what the X11 badness is. (I guess only Oshima does) Yes, ...
5 years, 10 months ago (2015-02-19 06:13:50 UTC) #24
Jun Mukai
Okay, then lgtm. Honestly I still hope this could be solved in another place, but ...
5 years, 10 months ago (2015-02-19 18:07:55 UTC) #25
pkotwicz
Oshima, for a second look. Do you think we can use the Ozone behavior on ...
5 years, 10 months ago (2015-02-24 20:46:18 UTC) #28
pkotwicz
Oshima, Ping!
5 years, 9 months ago (2015-02-26 19:09:54 UTC) #29
oshima
lgtm for now. I think once we fully migrated to ozone, it'd be nice if ...
5 years, 9 months ago (2015-02-27 22:11:33 UTC) #30
pkotwicz
We still need this logic even once we fully migrate to ozone. - The position ...
5 years, 9 months ago (2015-02-28 18:33:02 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/902123002/160001
5 years, 9 months ago (2015-02-28 18:51:23 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/894)
5 years, 9 months ago (2015-02-28 18:56:04 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/902123002/180001
5 years, 9 months ago (2015-02-28 23:21:45 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/915)
5 years, 9 months ago (2015-02-28 23:26:35 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/902123002/180001
5 years, 9 months ago (2015-03-01 00:42:24 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/926)
5 years, 9 months ago (2015-03-01 00:47:41 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/902123002/180001
5 years, 9 months ago (2015-03-01 16:04:54 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/974)
5 years, 9 months ago (2015-03-01 16:09:37 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/902123002/180001
5 years, 9 months ago (2015-03-01 22:18:36 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/1003)
5 years, 9 months ago (2015-03-01 22:23:17 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/902123002/180001
5 years, 9 months ago (2015-03-02 15:15:33 UTC) #55
commit-bot: I haz the power
Committed patchset #5 (id:180001)
5 years, 9 months ago (2015-03-02 16:17:07 UTC) #56
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/04bbbd5582af60920656cc9768d2ac4e03709b69 Cr-Commit-Position: refs/heads/master@{#318708}
5 years, 9 months ago (2015-03-02 16:18:04 UTC) #57
oshima
5 years, 9 months ago (2015-03-02 20:53:03 UTC) #58
Message was sent while issue was closed.
On 2015/02/28 18:33:02, pkotwicz wrote:
> We still need this logic even once we fully migrate to ozone.
> - The position in screen coordinates may change even if the position in native
> coordinates does not change (e.g. rotation)

We can simplify the logic by
1) including the native cursor location in the display change event
2) generate synthesized event if the native coord didn't change, but it resulted
in
   different screen location.

We can eliminate the logic to fit into the display at least.

> - If ozone moved the mouse as a result of a bounds change, the move would be
> asynchronous. This would make it difficult to detect if the screen position
did
> change

If the display change indeed caused the mouse move, it's ok to show the mouse.

> - If we relied on ozone to take care of this, the behavior would be hard to
> test. My understanding is that ash_unittests has to use a stub implementation
> and that a "real integration test" is impossible with ozone. For instance, I
am
> unsure how we would test that "the rotation of the composited cursor is
> correctly updated when a screen is disconnected" if ozone was responsible for
> repositioning the cursor after a screen is disconnected

It'd be nice if we can have mocked DriWindow / DriCursor, and run test on them.

Powered by Google App Engine
This is Rietveld 408576698