Index: ui/views/widget/x11_window_event_filter.cc |
diff --git a/ui/views/widget/x11_window_event_filter.cc b/ui/views/widget/x11_window_event_filter.cc |
index 472383cea1afc11fa12431eed16973a1b0f161aa..8edf91d8f460f95458858fa502a855b7aba2fd42 100644 |
--- a/ui/views/widget/x11_window_event_filter.cc |
+++ b/ui/views/widget/x11_window_event_filter.cc |
@@ -106,26 +106,7 @@ bool X11WindowEventFilter::PreHandleMouseEvent(aura::Window* target, |
return false; |
// Get the |x_root_window_| location out of the native event. |
- gfx::Point root_location; |
- const base::NativeEvent& native_event = event->native_event(); |
- switch (native_event->type) { |
- case ButtonPress: { |
- root_location.SetPoint(native_event->xbutton.x_root, |
- native_event->xbutton.y_root); |
- break; |
- } |
- case GenericEvent: { |
- XIDeviceEvent* xievent = |
- static_cast<XIDeviceEvent*>(native_event->xcookie.data); |
- root_location.SetPoint(xievent->root_x, xievent->root_y); |
- break; |
- } |
- default: { |
- NOTREACHED(); |
- return false; |
- } |
- } |
- |
+ gfx::Point root_location = event->system_location(); |
return DispatchHostWindowDragMovement(component, root_location); |
} |