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

Issue 2778943005: Keep root_location to be in pixels and display coordinates in WS. (Closed)

Created:
3 years, 8 months ago by riajiang
Modified:
3 years, 7 months ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, rjkroege, kylechar
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Keep root_location to be in pixels and display coordinates in WS. We convert event root_location to be in screen coordinates which mixed pixels and dip in PlatformDisplayDefault::UpdateEventRootLocation(). Then in WindowManagerState::GetRootWindowContaining(), we expect root_location to be in screen coordinates to find the display that event is on and mixed pixels and dip again. As root_location should always be in pixels in window server, changing it to skip the conversion in PlatformDisplayDefault::UpdateEventRootLocation() so root_location remains in pixels and display coordinates after that; and in WindowManagerState::GetRootWindowContaining(), using display id and display coordinates to get the root_location in screen coordinates and find the display (not actually updating root_location to screen coordinates). mouse_pointer_last_location is also in pixels and display coordinates now as a result as it is the same as event root_location. TODO: make sure this works with drag-and-drop once mouse warp is functional with mushroom. BUG=701036 TEST= mus_ws_unittests manual with two displays, one of which is hi-dpi ./out/oxygen/chrome --user-data-dir=/tmp/chrome --mus --screen-config=1600x900,1600x900^300/i Review-Url: https://codereview.chromium.org/2778943005 Cr-Commit-Position: refs/heads/master@{#475133} Committed: https://chromium.googlesource.com/chromium/src/+/0fb00abce4d3e56ef50a1e6fc1eee947d97036f0

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : rebase #

Patch Set 4 : . #

Patch Set 5 : . #

Total comments: 13

Patch Set 6 : pass display_id #

Patch Set 7 : TODO #

Total comments: 18

Patch Set 8 : comments #

Patch Set 9 : drop events #

Total comments: 2

Patch Set 10 : comment #

Patch Set 11 : const #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -201 lines) Patch
M services/ui/ws/cursor_location_manager.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M services/ui/ws/cursor_location_manager.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M services/ui/ws/display_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -4 lines 0 comments Download
M services/ui/ws/event_dispatcher.h View 1 2 3 4 5 6 7 4 chunks +16 lines, -5 lines 0 comments Download
M services/ui/ws/event_dispatcher.cc View 1 2 3 4 5 13 chunks +36 lines, -28 lines 0 comments Download
M services/ui/ws/event_dispatcher_delegate.h View 1 2 3 4 5 6 7 3 chunks +17 lines, -7 lines 0 comments Download
M services/ui/ws/event_dispatcher_unittest.cc View 1 2 3 4 5 56 chunks +69 lines, -63 lines 0 comments Download
M services/ui/ws/platform_display_default.h View 1 2 3 2 chunks +0 lines, -8 lines 0 comments Download
M services/ui/ws/platform_display_default.cc View 1 2 3 4 5 2 chunks +2 lines, -12 lines 0 comments Download
M services/ui/ws/test_utils.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M services/ui/ws/window_manager_state.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +23 lines, -10 lines 0 comments Download
M services/ui/ws/window_manager_state.cc View 1 2 3 4 5 6 7 8 9 10 18 chunks +83 lines, -42 lines 0 comments Download
M services/ui/ws/window_manager_state_unittest.cc View 1 2 3 4 5 18 chunks +51 lines, -17 lines 0 comments Download

Messages

Total messages: 53 (32 generated)
riajiang
Hi, PTAL, thanks!
3 years, 7 months ago (2017-05-16 21:32:19 UTC) #19
sky
https://codereview.chromium.org/2778943005/diff/100001/services/ui/ws/event_dispatcher.h File services/ui/ws/event_dispatcher.h (right): https://codereview.chromium.org/2778943005/diff/100001/services/ui/ws/event_dispatcher.h#newcode62 services/ui/ws/event_dispatcher.h:62: void SetMousePointerDisplayLocationAndId(const gfx::Point& display_location, optional: the new name is ...
3 years, 7 months ago (2017-05-17 16:53:42 UTC) #24
sky
And thanks for taking this on
3 years, 7 months ago (2017-05-17 16:54:12 UTC) #25
sky
https://codereview.chromium.org/2778943005/diff/100001/services/ui/ws/window_manager_state.cc File services/ui/ws/window_manager_state.cc (right): https://codereview.chromium.org/2778943005/diff/100001/services/ui/ws/window_manager_state.cc#newcode639 services/ui/ws/window_manager_state.cc:639: ->OnMouseCursorLocationChanged(point_in_screen); On 2017/05/17 16:53:42, sky wrote: > Won't this ...
3 years, 7 months ago (2017-05-17 19:02:07 UTC) #26
riajiang
https://codereview.chromium.org/2778943005/diff/100001/services/ui/ws/event_dispatcher.h File services/ui/ws/event_dispatcher.h (right): https://codereview.chromium.org/2778943005/diff/100001/services/ui/ws/event_dispatcher.h#newcode62 services/ui/ws/event_dispatcher.h:62: void SetMousePointerDisplayLocationAndId(const gfx::Point& display_location, On 2017/05/17 16:53:41, sky wrote: ...
3 years, 7 months ago (2017-05-19 20:45:06 UTC) #27
sky
https://codereview.chromium.org/2778943005/diff/100001/services/ui/ws/window_manager_state.cc File services/ui/ws/window_manager_state.cc (right): https://codereview.chromium.org/2778943005/diff/100001/services/ui/ws/window_manager_state.cc#newcode639 services/ui/ws/window_manager_state.cc:639: ->OnMouseCursorLocationChanged(point_in_screen); On 2017/05/19 20:45:05, riajiang wrote: > On 2017/05/17 ...
3 years, 7 months ago (2017-05-19 22:12:19 UTC) #29
sky
I'm going to wait to review until you resolve the display_id/drag-n-drop issue. Ping once that ...
3 years, 7 months ago (2017-05-19 22:12:45 UTC) #30
riajiang
On 2017/05/19 22:12:45, sky wrote: > I'm going to wait to review until you resolve ...
3 years, 7 months ago (2017-05-25 21:18:57 UTC) #31
sky
https://codereview.chromium.org/2778943005/diff/140001/services/ui/ws/cursor_location_manager.h File services/ui/ws/cursor_location_manager.h (right): https://codereview.chromium.org/2778943005/diff/140001/services/ui/ws/cursor_location_manager.h#newcode27 services/ui/ws/cursor_location_manager.h:27: void OnMouseCursorLocationChanged(const gfx::Point& point); Please rename to point_in_dips to ...
3 years, 7 months ago (2017-05-25 22:10:19 UTC) #32
riajiang
https://codereview.chromium.org/2778943005/diff/140001/services/ui/ws/cursor_location_manager.h File services/ui/ws/cursor_location_manager.h (right): https://codereview.chromium.org/2778943005/diff/140001/services/ui/ws/cursor_location_manager.h#newcode27 services/ui/ws/cursor_location_manager.h:27: void OnMouseCursorLocationChanged(const gfx::Point& point); On 2017/05/25 22:10:19, sky wrote: ...
3 years, 7 months ago (2017-05-25 22:59:23 UTC) #33
sky
https://codereview.chromium.org/2778943005/diff/140001/services/ui/ws/window_manager_state.cc File services/ui/ws/window_manager_state.cc (right): https://codereview.chromium.org/2778943005/diff/140001/services/ui/ws/window_manager_state.cc#newcode553 services/ui/ws/window_manager_state.cc:553: if (display) { On 2017/05/25 22:59:23, riajiang wrote: > ...
3 years, 7 months ago (2017-05-25 23:55:24 UTC) #34
riajiang
https://codereview.chromium.org/2778943005/diff/140001/services/ui/ws/window_manager_state.cc File services/ui/ws/window_manager_state.cc (right): https://codereview.chromium.org/2778943005/diff/140001/services/ui/ws/window_manager_state.cc#newcode553 services/ui/ws/window_manager_state.cc:553: if (display) { On 2017/05/25 23:55:24, sky wrote: > ...
3 years, 7 months ago (2017-05-26 01:40:09 UTC) #35
sky
LGTM
3 years, 7 months ago (2017-05-26 03:00:22 UTC) #36
sadrul
lgtm https://codereview.chromium.org/2778943005/diff/180001/services/ui/ws/window_manager_state.h File services/ui/ws/window_manager_state.h (right): https://codereview.chromium.org/2778943005/diff/180001/services/ui/ws/window_manager_state.h#newcode248 services/ui/ws/window_manager_state.h:248: // if |point| is successfully updated, false otherwise. ...
3 years, 7 months ago (2017-05-26 18:04:50 UTC) #37
riajiang
https://codereview.chromium.org/2778943005/diff/180001/services/ui/ws/window_manager_state.h File services/ui/ws/window_manager_state.h (right): https://codereview.chromium.org/2778943005/diff/180001/services/ui/ws/window_manager_state.h#newcode248 services/ui/ws/window_manager_state.h:248: // if |point| is successfully updated, false otherwise. On ...
3 years, 7 months ago (2017-05-26 18:35:30 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2778943005/200001
3 years, 7 months ago (2017-05-26 18:36:13 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/421186)
3 years, 7 months ago (2017-05-26 19:23:10 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2778943005/220001
3 years, 7 months ago (2017-05-26 19:46:11 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/187846) linux_chromium_headless_rel on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 7 months ago (2017-05-26 19:53:47 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2778943005/220001
3 years, 7 months ago (2017-05-26 21:14:42 UTC) #50
commit-bot: I haz the power
3 years, 7 months ago (2017-05-26 21:20:56 UTC) #53
Message was sent while issue was closed.
Committed patchset #11 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/0fb00abce4d3e56ef50a1e6fc1ee...

Powered by Google App Engine
This is Rietveld 408576698