OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" | 5 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 | 10 |
11 #include "ash/display/display_controller.h" | 11 #include "ash/display/display_controller.h" |
12 #include "ash/screen_util.h" | 12 #include "ash/screen_util.h" |
13 #include "ash/shell.h" | 13 #include "ash/shell.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "ui/aura/client/screen_position_client.h" | 16 #include "ui/aura/client/screen_position_client.h" |
17 #include "ui/aura/env.h" | 17 #include "ui/aura/env.h" |
18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
19 #include "ui/aura/window_event_dispatcher.h" | 19 #include "ui/aura/window_event_dispatcher.h" |
20 #include "ui/aura/window_tree_host.h" | 20 #include "ui/aura/window_tree_host.h" |
| 21 #include "ui/events/devices/device_data_manager_x11.h" |
21 #include "ui/events/event.h" | 22 #include "ui/events/event.h" |
22 #include "ui/events/event_utils.h" | 23 #include "ui/events/event_utils.h" |
23 #include "ui/events/keycodes/keyboard_codes_posix.h" | 24 #include "ui/events/keycodes/keyboard_codes_posix.h" |
24 #include "ui/events/platform/platform_event_source.h" | 25 #include "ui/events/platform/platform_event_source.h" |
25 #include "ui/events/x/device_data_manager_x11.h" | |
26 #include "ui/events/x/device_list_cache_x.h" | 26 #include "ui/events/x/device_list_cache_x.h" |
27 #include "ui/gfx/x/x11_types.h" | 27 #include "ui/gfx/x/x11_types.h" |
28 | 28 |
29 namespace ash { | 29 namespace ash { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // The name of the xinput device corresponding to the internal touchpad. | 33 // The name of the xinput device corresponding to the internal touchpad. |
34 const char kInternalTouchpadName[] = "Elan Touchpad"; | 34 const char kInternalTouchpadName[] = "Elan Touchpad"; |
35 | 35 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // blocked. Move the mouse cursor back to its last known location resulting | 143 // blocked. Move the mouse cursor back to its last known location resulting |
144 // from an external mouse to prevent the internal touchpad from moving it. | 144 // from an external mouse to prevent the internal touchpad from moving it. |
145 SetMouseLocationInScreen(last_mouse_location_); | 145 SetMouseLocationInScreen(last_mouse_location_); |
146 } else { | 146 } else { |
147 // Track the last location seen from an external mouse event. | 147 // Track the last location seen from an external mouse event. |
148 last_mouse_location_ = GetMouseLocationInScreen(); | 148 last_mouse_location_ = GetMouseLocationInScreen(); |
149 } | 149 } |
150 } | 150 } |
151 | 151 |
152 } // namespace ash | 152 } // namespace ash |
OLD | NEW |