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

Unified Diff: ash/wm/toplevel_window_event_filter.cc

Issue 10827022: Fix coordinates in tab detach &drag code and multi window resizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/toplevel_window_event_filter.h ('k') | ash/wm/workspace/multi_window_resize_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/toplevel_window_event_filter.cc
diff --git a/ash/wm/toplevel_window_event_filter.cc b/ash/wm/toplevel_window_event_filter.cc
index c950036b5b15a2efdd358e50922e8accb898494d..8d0ee8d38a220e00acce834ab668794968431b25 100644
--- a/ash/wm/toplevel_window_event_filter.cc
+++ b/ash/wm/toplevel_window_event_filter.cc
@@ -80,10 +80,10 @@ bool ToplevelWindowEventFilter::PreHandleMouseEvent(aura::Window* target,
if ((event->flags() &
(ui::EF_IS_DOUBLE_CLICK | ui::EF_IS_TRIPLE_CLICK)) == 0 &&
WindowResizer::GetBoundsChangeForWindowComponent(component)) {
- gfx::Point parent_location(
+ gfx::Point location_in_parent(
ConvertPointToParent(target, event->location()));
window_resizer_.reset(
- CreateWindowResizer(target, parent_location, component));
+ CreateWindowResizer(target, location_in_parent, component));
} else {
window_resizer_.reset();
}
@@ -136,10 +136,10 @@ ui::GestureStatus ToplevelWindowEventFilter::PreHandleGestureEvent(
return ui::GESTURE_STATUS_UNKNOWN;
}
in_gesture_resize_ = true;
- gfx::Point parent_location(
+ gfx::Point location_in_parent(
ConvertPointToParent(target, event->location()));
window_resizer_.reset(
- CreateWindowResizer(target, parent_location, component));
+ CreateWindowResizer(target, location_in_parent, component));
break;
}
case ui::ET_GESTURE_SCROLL_UPDATE: {
@@ -209,7 +209,7 @@ void ToplevelWindowEventFilter::RunMoveLoop(aura::Window* source) {
GetLastTouchPointForTarget(source, &drag_location);
DCHECK(has_point);
} else {
- drag_location = gfx::Screen::GetCursorScreenPoint();
+ drag_location = root_window->GetLastMouseLocationInRoot();
aura::Window::ConvertPointToWindow(
root_window, source->parent(), &drag_location);
}
@@ -241,11 +241,12 @@ void ToplevelWindowEventFilter::EndMoveLoop() {
// static
WindowResizer* ToplevelWindowEventFilter::CreateWindowResizer(
aura::Window* window,
- const gfx::Point& point,
+ const gfx::Point& point_in_parent,
int window_component) {
if (!wm::IsWindowNormal(window))
return NULL; // Don't allow resizing/dragging maximized/fullscreen windows.
- return DefaultWindowResizer::Create(window, point, window_component);
+ return DefaultWindowResizer::Create(
+ window, point_in_parent, window_component);
}
void ToplevelWindowEventFilter::CompleteDrag(DragCompletionStatus status,
« no previous file with comments | « ash/wm/toplevel_window_event_filter.h ('k') | ash/wm/workspace/multi_window_resize_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698