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/views/widget/desktop_aura/desktop_root_window_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" |
6 | 6 |
7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <X11/Xregion.h> | 10 #include <X11/Xregion.h> |
11 #include <X11/Xutil.h> | 11 #include <X11/Xutil.h> |
12 | 12 |
13 #include "base/message_loop/message_pump_x11.h" | 13 #include "base/message_loop/message_pump_x11.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "third_party/skia/include/core/SkPath.h" | 16 #include "third_party/skia/include/core/SkPath.h" |
17 #include "ui/aura/client/screen_position_client.h" | 17 #include "ui/aura/client/screen_position_client.h" |
18 #include "ui/aura/client/user_action_client.h" | 18 #include "ui/aura/client/user_action_client.h" |
19 #include "ui/aura/focus_manager.h" | 19 #include "ui/aura/focus_manager.h" |
20 #include "ui/aura/root_window.h" | 20 #include "ui/aura/root_window.h" |
21 #include "ui/aura/window_property.h" | 21 #include "ui/aura/window_property.h" |
22 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" | 22 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" |
23 #include "ui/base/touch/touch_factory_x11.h" | 23 #include "ui/base/touch/touch_factory_x11.h" |
24 #include "ui/base/x/x11_util.h" | 24 #include "ui/base/x/x11_util.h" |
25 #include "ui/events/event_utils.h" | 25 #include "ui/events/event_utils.h" |
| 26 #include "ui/events/x/device_data_manager.h" |
26 #include "ui/gfx/insets.h" | 27 #include "ui/gfx/insets.h" |
27 #include "ui/gfx/path_x11.h" | 28 #include "ui/gfx/path_x11.h" |
28 #include "ui/native_theme/native_theme.h" | 29 #include "ui/native_theme/native_theme.h" |
29 #include "ui/views/corewm/compound_event_filter.h" | 30 #include "ui/views/corewm/compound_event_filter.h" |
30 #include "ui/views/corewm/corewm_switches.h" | 31 #include "ui/views/corewm/corewm_switches.h" |
31 #include "ui/views/corewm/cursor_manager.h" | 32 #include "ui/views/corewm/cursor_manager.h" |
32 #include "ui/views/corewm/focus_controller.h" | 33 #include "ui/views/corewm/focus_controller.h" |
33 #include "ui/views/ime/input_method.h" | 34 #include "ui/views/ime/input_method.h" |
34 #include "ui/views/linux_ui/linux_ui.h" | 35 #include "ui/views/linux_ui/linux_ui.h" |
35 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater_aurax11.h" | 36 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater_aurax11.h" |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 break; | 1258 break; |
1258 } | 1259 } |
1259 case MappingNotify: { | 1260 case MappingNotify: { |
1260 switch (xev->xmapping.request) { | 1261 switch (xev->xmapping.request) { |
1261 case MappingModifier: | 1262 case MappingModifier: |
1262 case MappingKeyboard: | 1263 case MappingKeyboard: |
1263 XRefreshKeyboardMapping(&xev->xmapping); | 1264 XRefreshKeyboardMapping(&xev->xmapping); |
1264 root_window_->OnKeyboardMappingChanged(); | 1265 root_window_->OnKeyboardMappingChanged(); |
1265 break; | 1266 break; |
1266 case MappingPointer: | 1267 case MappingPointer: |
1267 ui::UpdateButtonMap(); | 1268 ui::DeviceDataManager::GetInstance()->UpdateButtonMap(); |
1268 break; | 1269 break; |
1269 default: | 1270 default: |
1270 NOTIMPLEMENTED() << " Unknown request: " << xev->xmapping.request; | 1271 NOTIMPLEMENTED() << " Unknown request: " << xev->xmapping.request; |
1271 break; | 1272 break; |
1272 } | 1273 } |
1273 break; | 1274 break; |
1274 } | 1275 } |
1275 case MotionNotify: { | 1276 case MotionNotify: { |
1276 // Discard all but the most recent motion event that targets the same | 1277 // Discard all but the most recent motion event that targets the same |
1277 // window with unchanged state. | 1278 // window with unchanged state. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 if (linux_ui) { | 1368 if (linux_ui) { |
1368 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1369 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
1369 if (native_theme) | 1370 if (native_theme) |
1370 return native_theme; | 1371 return native_theme; |
1371 } | 1372 } |
1372 | 1373 |
1373 return ui::NativeTheme::instance(); | 1374 return ui::NativeTheme::instance(); |
1374 } | 1375 } |
1375 | 1376 |
1376 } // namespace views | 1377 } // namespace views |
OLD | NEW |