| Index: ash/frame/caption_buttons/alternate_frame_size_button.cc
|
| diff --git a/ash/frame/caption_buttons/alternate_frame_size_button.cc b/ash/frame/caption_buttons/alternate_frame_size_button.cc
|
| index 54799cb134f82e62d9b5458a3ea98776149d120e..f3303ab8ebd9b58f5e0981315b3b1564270650c9 100644
|
| --- a/ash/frame/caption_buttons/alternate_frame_size_button.cc
|
| +++ b/ash/frame/caption_buttons/alternate_frame_size_button.cc
|
| @@ -137,7 +137,8 @@ void AlternateFrameSizeButton::OnGestureEvent(ui::GestureEvent* event) {
|
|
|
| void AlternateFrameSizeButton::StartSetButtonsToSnapModeTimer(
|
| const ui::LocatedEvent& event) {
|
| - set_buttons_to_snap_mode_timer_event_location_ = event.location();
|
| + set_buttons_to_snap_mode_timer_event_location_ =
|
| + gfx::ToFlooredPoint(event.location());
|
| if (set_buttons_to_snap_mode_delay_ms_ == 0) {
|
| AnimateButtonsToSnapMode();
|
| } else {
|
| @@ -177,8 +178,8 @@ void AlternateFrameSizeButton::UpdateSnapType(const ui::LocatedEvent& event) {
|
| // |set_buttons_to_snap_mode_timer_| is checked to avoid entering the snap
|
| // mode as a result of an unsupported drag type (e.g. only the right mouse
|
| // button is pressed).
|
| - gfx::Vector2d delta(
|
| - event.location() - set_buttons_to_snap_mode_timer_event_location_);
|
| + gfx::Vector2d delta(gfx::ToFlooredPoint(event.location()) -
|
| + set_buttons_to_snap_mode_timer_event_location_);
|
| if (!set_buttons_to_snap_mode_timer_.IsRunning() ||
|
| !views::View::ExceededDragThreshold(delta)) {
|
| return;
|
| @@ -186,7 +187,7 @@ void AlternateFrameSizeButton::UpdateSnapType(const ui::LocatedEvent& event) {
|
| AnimateButtonsToSnapMode();
|
| }
|
|
|
| - gfx::Point event_location_in_screen(event.location());
|
| + gfx::Point event_location_in_screen(gfx::ToFlooredPoint(event.location()));
|
| views::View::ConvertPointToScreen(this, &event_location_in_screen);
|
| const FrameCaptionButton* to_hover =
|
| GetButtonToHover(event_location_in_screen);
|
|
|