diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-20 14:40:23 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-20 14:40:23 +0000 |
commit | ed44e7227cdb483f3377ac49289eaab837467c39 (patch) | |
tree | ece9a1b6bf453f849edb9cf2a768873ce32f4a9b /ash/display | |
parent | 2202cf7b4ea5334b7b3f88bd59c57e33350c2474 (diff) | |
download | chromium_src-ed44e7227cdb483f3377ac49289eaab837467c39.zip chromium_src-ed44e7227cdb483f3377ac49289eaab837467c39.tar.gz chromium_src-ed44e7227cdb483f3377ac49289eaab837467c39.tar.bz2 |
Use floored value for screen size and mouse location for consistency.
This is causing mismatch between expected bounds and actual
mouse position in auto-hide code.
- don't synthesize mouse event if the current location is outside of root window. This happens when dragging window and
unnecessary to handle.
- Fix system location in synthesized event. It's using
screen coordinates instead of system coordinates.
BUG=222137
TEST=updated the test. Tested manually. see bug.
Review URL: https://chromiumcodereview.appspot.com/12579012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display')
-rw-r--r-- | ash/display/display_info.cc | 2 | ||||
-rw-r--r-- | ash/display/screen_position_controller_unittest.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc index 7715c82..b46dceb 100644 --- a/ash/display/display_info.cc +++ b/ash/display/display_info.cc @@ -177,7 +177,7 @@ void DisplayInfo::UpdateDisplaySize() { size_in_pixel_.SetSize(size_in_pixel_.height(), size_in_pixel_.width()); gfx::SizeF size_f(size_in_pixel_); size_f.Scale(ui_scale_); - size_in_pixel_ = gfx::ToRoundedSize(size_f); + size_in_pixel_ = gfx::ToFlooredSize(size_f); } void DisplayInfo::SetOverscanInsets(bool custom, diff --git a/ash/display/screen_position_controller_unittest.cc b/ash/display/screen_position_controller_unittest.cc index bb82cf8..0cd4ca0 100644 --- a/ash/display/screen_position_controller_unittest.cc +++ b/ash/display/screen_position_controller_unittest.cc @@ -251,7 +251,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenUIScale) { EXPECT_EQ("45,225", ConvertHostPointToScreen(60, 300)); // The point is on the 2nd host. Point on 2nd host (60,150) - // - screen [+(150,0)] - EXPECT_EQ("210,51", ConvertHostPointToScreen(60, 450)); + EXPECT_EQ("210,49", ConvertHostPointToScreen(60, 450)); // Move |window_| to the 2nd. window_->SetBoundsInScreen(gfx::Rect(300, 20, 50, 50), |