| 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/window_tree_host_x11.h" | 5 #include "ui/aura/window_tree_host_x11.h" |
| 6 | 6 |
| 7 #include <strings.h> | 7 #include <strings.h> |
| 8 #include <X11/cursorfont.h> | 8 #include <X11/cursorfont.h> |
| 9 #include <X11/extensions/Xfixes.h> | 9 #include <X11/extensions/Xfixes.h> |
| 10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // Usually those will be equal, | 201 // Usually those will be equal, |
| 202 // if not, I am not sure what the correct value should be. | 202 // if not, I am not sure what the correct value should be. |
| 203 event->set_root_location(gfx::Point(x, y)); | 203 event->set_root_location(gfx::Point(x, y)); |
| 204 } | 204 } |
| 205 event->set_location(gfx::Point(x, y)); | 205 event->set_location(gfx::Point(x, y)); |
| 206 #endif // defined(USE_XI2_MT) | 206 #endif // defined(USE_XI2_MT) |
| 207 } | 207 } |
| 208 | 208 |
| 209 private: | 209 private: |
| 210 // Overridden from base::MessagePumpObserver: | 210 // Overridden from base::MessagePumpObserver: |
| 211 virtual base::EventStatus WillProcessEvent( | 211 virtual void WillProcessEvent(const base::NativeEvent& event) OVERRIDE { |
| 212 const base::NativeEvent& event) OVERRIDE { | |
| 213 #if defined(USE_XI2_MT) | 212 #if defined(USE_XI2_MT) |
| 214 if (event->type == GenericEvent && | 213 if (event->type == GenericEvent && |
| 215 (event->xgeneric.evtype == XI_TouchBegin || | 214 (event->xgeneric.evtype == XI_TouchBegin || |
| 216 event->xgeneric.evtype == XI_TouchUpdate || | 215 event->xgeneric.evtype == XI_TouchUpdate || |
| 217 event->xgeneric.evtype == XI_TouchEnd)) { | 216 event->xgeneric.evtype == XI_TouchEnd)) { |
| 218 XIDeviceEvent* xievent = static_cast<XIDeviceEvent*>(event->xcookie.data); | 217 XIDeviceEvent* xievent = static_cast<XIDeviceEvent*>(event->xcookie.data); |
| 219 xievent->event = xievent->root; | 218 xievent->event = xievent->root; |
| 220 xievent->event_x = xievent->root_x; | 219 xievent->event_x = xievent->root_x; |
| 221 xievent->event_y = xievent->root_y; | 220 xievent->event_y = xievent->root_y; |
| 222 } | 221 } |
| 223 #endif // defined(USE_XI2_MT) | 222 #endif // defined(USE_XI2_MT) |
| 224 return base::EVENT_CONTINUE; | |
| 225 } | 223 } |
| 226 | 224 |
| 227 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE { | 225 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE { |
| 228 } | 226 } |
| 229 | 227 |
| 230 // The difference in screen's native resolution pixels between | 228 // The difference in screen's native resolution pixels between |
| 231 // the border of the touchscreen and the border of the screen, | 229 // the border of the touchscreen and the border of the screen, |
| 232 // aka bezel sizes. | 230 // aka bezel sizes. |
| 233 int left_; | 231 int left_; |
| 234 int right_; | 232 int right_; |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 } | 917 } |
| 920 | 918 |
| 921 namespace test { | 919 namespace test { |
| 922 | 920 |
| 923 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 921 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
| 924 default_override_redirect = override_redirect; | 922 default_override_redirect = override_redirect; |
| 925 } | 923 } |
| 926 | 924 |
| 927 } // namespace test | 925 } // namespace test |
| 928 } // namespace aura | 926 } // namespace aura |
| OLD | NEW |