| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/event.h" | 5 #include "ui/aura/event.h" |
| 6 | 6 |
| 7 #if defined(USE_X11) | 7 #if defined(USE_X11) |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Transform has to be done at root level. | 122 // Transform has to be done at root level. |
| 123 DCHECK_EQ(root_location_.x(), location_.x()); | 123 DCHECK_EQ(root_location_.x(), location_.x()); |
| 124 DCHECK_EQ(root_location_.y(), location_.y()); | 124 DCHECK_EQ(root_location_.y(), location_.y()); |
| 125 gfx::Point3f p(location_); | 125 gfx::Point3f p(location_); |
| 126 root_transform.TransformPointReverse(p); | 126 root_transform.TransformPointReverse(p); |
| 127 root_location_ = location_ = p.AsPoint(); | 127 root_location_ = location_ = p.AsPoint(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 MouseEvent::MouseEvent(const base::NativeEvent& native_event) | 130 MouseEvent::MouseEvent(const base::NativeEvent& native_event) |
| 131 : LocatedEvent(native_event) { | 131 : LocatedEvent(native_event) { |
| 132 if (type() == ui::ET_MOUSE_PRESSED) | 132 if (type() == ui::ET_MOUSE_PRESSED |
| 133 #if defined(USE_X11) |
| 134 && !native_event->xany.send_event |
| 135 #endif |
| 136 ) |
| 133 SetClickCount(GetRepeatCount(*this)); | 137 SetClickCount(GetRepeatCount(*this)); |
| 134 } | 138 } |
| 135 | 139 |
| 136 MouseEvent::MouseEvent(const MouseEvent& model, Window* source, Window* target) | 140 MouseEvent::MouseEvent(const MouseEvent& model, Window* source, Window* target) |
| 137 : LocatedEvent(model, source, target) { | 141 : LocatedEvent(model, source, target) { |
| 138 } | 142 } |
| 139 | 143 |
| 140 MouseEvent::MouseEvent(const MouseEvent& model, | 144 MouseEvent::MouseEvent(const MouseEvent& model, |
| 141 Window* source, | 145 Window* source, |
| 142 Window* target, | 146 Window* target, |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 391 |
| 388 GestureEvent::GestureEvent(const GestureEvent& model, | 392 GestureEvent::GestureEvent(const GestureEvent& model, |
| 389 Window* source, | 393 Window* source, |
| 390 Window* target) | 394 Window* target) |
| 391 : LocatedEvent(model, source, target), | 395 : LocatedEvent(model, source, target), |
| 392 delta_x_(model.delta_x_), | 396 delta_x_(model.delta_x_), |
| 393 delta_y_(model.delta_y_) { | 397 delta_y_(model.delta_y_) { |
| 394 } | 398 } |
| 395 | 399 |
| 396 } // namespace aura | 400 } // namespace aura |
| OLD | NEW |