| 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/default_capture_client.h" |
| 15 #include "ui/aura/client/user_action_client.h" | 16 #include "ui/aura/client/user_action_client.h" |
| 16 #include "ui/aura/desktop/desktop_activation_client.h" | 17 #include "ui/aura/desktop/desktop_activation_client.h" |
| 17 #include "ui/aura/desktop/desktop_cursor_client.h" | 18 #include "ui/aura/desktop/desktop_cursor_client.h" |
| 18 #include "ui/aura/desktop/desktop_dispatcher_client.h" | 19 #include "ui/aura/desktop/desktop_dispatcher_client.h" |
| 19 #include "ui/aura/focus_manager.h" | 20 #include "ui/aura/focus_manager.h" |
| 20 #include "ui/aura/root_window.h" | 21 #include "ui/aura/root_window.h" |
| 21 #include "ui/aura/shared/compound_event_filter.h" | 22 #include "ui/aura/shared/compound_event_filter.h" |
| 22 #include "ui/aura/shared/input_method_event_filter.h" | 23 #include "ui/aura/shared/input_method_event_filter.h" |
| 23 #include "ui/aura/window_property.h" | 24 #include "ui/aura/window_property.h" |
| 24 #include "ui/base/native_theme/native_theme.h" | 25 #include "ui/base/native_theme/native_theme.h" |
| 25 #include "ui/base/touch/touch_factory.h" | 26 #include "ui/base/touch/touch_factory.h" |
| 26 #include "ui/base/x/x11_util.h" | 27 #include "ui/base/x/x11_util.h" |
| 27 #include "ui/views/ime/input_method_bridge.h" | 28 #include "ui/views/ime/input_method_bridge.h" |
| 28 #include "ui/views/widget/desktop_capture_client.h" | |
| 29 #include "ui/views/widget/desktop_layout_manager.h" | 29 #include "ui/views/widget/desktop_layout_manager.h" |
| 30 #include "ui/views/widget/desktop_native_widget_aura.h" | 30 #include "ui/views/widget/desktop_native_widget_aura.h" |
| 31 #include "ui/views/widget/desktop_screen_position_client.h" | 31 #include "ui/views/widget/desktop_screen_position_client.h" |
| 32 #include "ui/views/widget/x11_desktop_handler.h" | 32 #include "ui/views/widget/x11_desktop_handler.h" |
| 33 #include "ui/views/widget/x11_desktop_window_move_client.h" | 33 #include "ui/views/widget/x11_desktop_window_move_client.h" |
| 34 #include "ui/views/widget/x11_window_event_filter.h" | 34 #include "ui/views/widget/x11_window_event_filter.h" |
| 35 | 35 |
| 36 namespace views { | 36 namespace views { |
| 37 | 37 |
| 38 DesktopRootWindowHostLinux* DesktopRootWindowHostLinux::g_current_capture = | 38 DesktopRootWindowHostLinux* DesktopRootWindowHostLinux::g_current_capture = |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 root_window_host_delegate_ = root_window_; | 182 root_window_host_delegate_ = root_window_; |
| 183 | 183 |
| 184 // If we're given a parent, we need to mark ourselves as transient to another | 184 // If we're given a parent, we need to mark ourselves as transient to another |
| 185 // window. Otherwise activation gets screwy. | 185 // window. Otherwise activation gets screwy. |
| 186 gfx::NativeView parent = params.GetParent(); | 186 gfx::NativeView parent = params.GetParent(); |
| 187 if (!params.child && params.GetParent()) | 187 if (!params.child && params.GetParent()) |
| 188 parent->AddTransientChild(content_window_); | 188 parent->AddTransientChild(content_window_); |
| 189 | 189 |
| 190 native_widget_delegate_->OnNativeWidgetCreated(); | 190 native_widget_delegate_->OnNativeWidgetCreated(); |
| 191 | 191 |
| 192 capture_client_.reset(new DesktopCaptureClient); | 192 capture_client_.reset(new aura::client::DefaultCaptureClient(root_window_)); |
| 193 aura::client::SetCaptureClient(root_window_, capture_client_.get()); | 193 aura::client::SetCaptureClient(root_window_, capture_client_.get()); |
| 194 | 194 |
| 195 root_window_->set_focus_manager( | 195 root_window_->set_focus_manager( |
| 196 X11DesktopHandler::get()->get_focus_manager()); | 196 X11DesktopHandler::get()->get_focus_manager()); |
| 197 | 197 |
| 198 aura::DesktopActivationClient* activation_client = | 198 aura::DesktopActivationClient* activation_client = |
| 199 X11DesktopHandler::get()->get_activation_client(); | 199 X11DesktopHandler::get()->get_activation_client(); |
| 200 aura::client::SetActivationClient( | 200 aura::client::SetActivationClient( |
| 201 root_window_, activation_client); | 201 root_window_, activation_client); |
| 202 | 202 |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 1076 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
| 1077 internal::NativeWidgetDelegate* native_widget_delegate, | 1077 internal::NativeWidgetDelegate* native_widget_delegate, |
| 1078 DesktopNativeWidgetAura* desktop_native_widget_aura, | 1078 DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 1079 const gfx::Rect& initial_bounds) { | 1079 const gfx::Rect& initial_bounds) { |
| 1080 return new DesktopRootWindowHostLinux(native_widget_delegate, | 1080 return new DesktopRootWindowHostLinux(native_widget_delegate, |
| 1081 desktop_native_widget_aura, | 1081 desktop_native_widget_aura, |
| 1082 initial_bounds); | 1082 initial_bounds); |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 } // namespace views | 1085 } // namespace views |
| OLD | NEW |