OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/events/x/events_x_utils.h" | 5 #include "ui/events/x/events_x_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <X11/extensions/XInput.h> | 9 #include <X11/extensions/XInput.h> |
10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
11 #include <X11/XKBlib.h> | 11 #include <X11/XKBlib.h> |
12 #include <X11/Xlib.h> | 12 #include <X11/Xlib.h> |
13 #include <X11/Xutil.h> | 13 #include <X11/Xutil.h> |
14 #include <cmath> | 14 #include <cmath> |
15 | 15 |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/memory/singleton.h" | 18 #include "base/memory/singleton.h" |
19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| 20 #include "ui/display/display.h" |
| 21 #include "ui/display/screen.h" |
20 #include "ui/events/devices/x11/device_data_manager_x11.h" | 22 #include "ui/events/devices/x11/device_data_manager_x11.h" |
21 #include "ui/events/devices/x11/device_list_cache_x11.h" | 23 #include "ui/events/devices/x11/device_list_cache_x11.h" |
22 #include "ui/events/devices/x11/touch_factory_x11.h" | 24 #include "ui/events/devices/x11/touch_factory_x11.h" |
23 #include "ui/events/keycodes/keyboard_code_conversion_x.h" | 25 #include "ui/events/keycodes/keyboard_code_conversion_x.h" |
24 #include "ui/gfx/display.h" | |
25 #include "ui/gfx/geometry/point.h" | 26 #include "ui/gfx/geometry/point.h" |
26 #include "ui/gfx/geometry/rect.h" | 27 #include "ui/gfx/geometry/rect.h" |
27 #include "ui/gfx/screen.h" | |
28 #include "ui/gfx/x/x11_atom_cache.h" | 28 #include "ui/gfx/x/x11_atom_cache.h" |
29 #include "ui/gfx/x/x11_types.h" | 29 #include "ui/gfx/x/x11_types.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // Scroll amount for each wheelscroll event. 53 is also the value used for GTK+. | 33 // Scroll amount for each wheelscroll event. 53 is also the value used for GTK+. |
34 const int kWheelScrollAmount = 53; | 34 const int kWheelScrollAmount = 53; |
35 | 35 |
36 const int kMinWheelButton = 4; | 36 const int kMinWheelButton = 4; |
37 const int kMaxWheelButton = 7; | 37 const int kMaxWheelButton = 7; |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 vy_ordinal, is_cancel); | 777 vy_ordinal, is_cancel); |
778 return true; | 778 return true; |
779 } | 779 } |
780 | 780 |
781 void ResetTimestampRolloverCountersForTesting() { | 781 void ResetTimestampRolloverCountersForTesting() { |
782 g_last_seen_timestamp_ms_ = 0; | 782 g_last_seen_timestamp_ms_ = 0; |
783 g_rollover_ms_ = 0; | 783 g_rollover_ms_ = 0; |
784 } | 784 } |
785 | 785 |
786 } // namespace ui | 786 } // namespace ui |
OLD | NEW |