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_root_window_host_linux.h" | 5 #include "ui/views/widget/desktop_root_window_host_linux.h" |
6 | 6 |
7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
9 #include <X11/Xutil.h> | 9 #include <X11/Xutil.h> |
10 | 10 |
11 #include "base/message_pump_aurax11.h" | 11 #include "base/message_pump_aurax11.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "ui/aura/client/screen_position_client.h" | 14 #include "ui/aura/client/screen_position_client.h" |
15 #include "ui/aura/client/user_action_client.h" | 15 #include "ui/aura/client/user_action_client.h" |
16 #include "ui/aura/desktop/desktop_activation_client.h" | 16 #include "ui/aura/desktop/desktop_activation_client.h" |
17 #include "ui/aura/desktop/desktop_dispatcher_client.h" | 17 #include "ui/aura/desktop/desktop_dispatcher_client.h" |
18 #include "ui/aura/focus_manager.h" | 18 #include "ui/aura/focus_manager.h" |
19 #include "ui/aura/root_window.h" | 19 #include "ui/aura/root_window.h" |
20 #include "ui/aura/shared/compound_event_filter.h" | 20 #include "ui/aura/shared/compound_event_filter.h" |
21 #include "ui/aura/shared/input_method_event_filter.h" | 21 #include "ui/aura/shared/input_method_event_filter.h" |
22 #include "ui/aura/window_property.h" | 22 #include "ui/aura/window_property.h" |
| 23 #include "ui/base/native_theme/native_theme.h" |
23 #include "ui/base/touch/touch_factory.h" | 24 #include "ui/base/touch/touch_factory.h" |
24 #include "ui/base/x/x11_util.h" | 25 #include "ui/base/x/x11_util.h" |
25 #include "ui/views/ime/input_method_bridge.h" | 26 #include "ui/views/ime/input_method_bridge.h" |
26 #include "ui/views/widget/desktop_capture_client.h" | 27 #include "ui/views/widget/desktop_capture_client.h" |
27 #include "ui/views/widget/desktop_layout_manager.h" | 28 #include "ui/views/widget/desktop_layout_manager.h" |
28 #include "ui/views/widget/desktop_native_widget_aura.h" | 29 #include "ui/views/widget/desktop_native_widget_aura.h" |
29 #include "ui/views/widget/desktop_screen_position_client.h" | 30 #include "ui/views/widget/desktop_screen_position_client.h" |
30 #include "ui/views/widget/x11_desktop_handler.h" | 31 #include "ui/views/widget/x11_desktop_handler.h" |
31 #include "ui/views/widget/x11_desktop_window_move_client.h" | 32 #include "ui/views/widget/x11_desktop_window_move_client.h" |
32 #include "ui/views/widget/x11_window_event_filter.h" | 33 #include "ui/views/widget/x11_window_event_filter.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 cursor_loader_(), | 82 cursor_loader_(), |
82 current_cursor_(ui::kCursorNull), | 83 current_cursor_(ui::kCursorNull), |
83 cursor_shown_(true), | 84 cursor_shown_(true), |
84 native_widget_delegate_(native_widget_delegate), | 85 native_widget_delegate_(native_widget_delegate), |
85 desktop_native_widget_aura_(desktop_native_widget_aura) { | 86 desktop_native_widget_aura_(desktop_native_widget_aura) { |
86 } | 87 } |
87 | 88 |
88 DesktopRootWindowHostLinux::~DesktopRootWindowHostLinux() { | 89 DesktopRootWindowHostLinux::~DesktopRootWindowHostLinux() { |
89 } | 90 } |
90 | 91 |
| 92 // static |
| 93 ui::NativeTheme* DesktopRootWindowLinux::GetNativeTheme(aura::Window* window) { |
| 94 return NativeTheme::instance(); |
| 95 } |
| 96 |
91 //////////////////////////////////////////////////////////////////////////////// | 97 //////////////////////////////////////////////////////////////////////////////// |
92 // DesktopRootWindowHostLinux, private: | 98 // DesktopRootWindowHostLinux, private: |
93 | 99 |
94 void DesktopRootWindowHostLinux::InitX11Window( | 100 void DesktopRootWindowHostLinux::InitX11Window( |
95 const Widget::InitParams& params) { | 101 const Widget::InitParams& params) { |
96 unsigned long attribute_mask = CWBackPixmap; | 102 unsigned long attribute_mask = CWBackPixmap; |
97 XSetWindowAttributes swa; | 103 XSetWindowAttributes swa; |
98 memset(&swa, 0, sizeof(swa)); | 104 memset(&swa, 0, sizeof(swa)); |
99 swa.background_pixmap = None; | 105 swa.background_pixmap = None; |
100 | 106 |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 1122 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
1117 internal::NativeWidgetDelegate* native_widget_delegate, | 1123 internal::NativeWidgetDelegate* native_widget_delegate, |
1118 DesktopNativeWidgetAura* desktop_native_widget_aura, | 1124 DesktopNativeWidgetAura* desktop_native_widget_aura, |
1119 const gfx::Rect& initial_bounds) { | 1125 const gfx::Rect& initial_bounds) { |
1120 return new DesktopRootWindowHostLinux(native_widget_delegate, | 1126 return new DesktopRootWindowHostLinux(native_widget_delegate, |
1121 desktop_native_widget_aura, | 1127 desktop_native_widget_aura, |
1122 initial_bounds); | 1128 initial_bounds); |
1123 } | 1129 } |
1124 | 1130 |
1125 } // namespace views | 1131 } // namespace views |
OLD | NEW |