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> |
(...skipping 244 matching lines...) Loading... |
255 // window. Otherwise activation gets screwy. | 255 // window. Otherwise activation gets screwy. |
256 gfx::NativeView parent = params.parent; | 256 gfx::NativeView parent = params.parent; |
257 if (!params.child && params.parent) | 257 if (!params.child && params.parent) |
258 parent->AddTransientChild(content_window_); | 258 parent->AddTransientChild(content_window_); |
259 | 259 |
260 // Ensure that the X11DesktopHandler exists so that it dispatches activation | 260 // Ensure that the X11DesktopHandler exists so that it dispatches activation |
261 // messages to us. | 261 // messages to us. |
262 X11DesktopHandler::get(); | 262 X11DesktopHandler::get(); |
263 | 263 |
264 // TODO(erg): Unify this code once the other consumer goes away. | 264 // TODO(erg): Unify this code once the other consumer goes away. |
265 x11_window_event_filter_.reset(new X11WindowEventFilter(root_window_)); | 265 x11_window_event_filter_.reset(new X11WindowEventFilter(root_window_, this)); |
266 x11_window_event_filter_->SetUseHostWindowBorders(false); | 266 x11_window_event_filter_->SetUseHostWindowBorders(false); |
267 desktop_native_widget_aura_->root_window_event_filter()->AddHandler( | 267 desktop_native_widget_aura_->root_window_event_filter()->AddHandler( |
268 x11_window_event_filter_.get()); | 268 x11_window_event_filter_.get()); |
269 | 269 |
270 x11_window_move_client_.reset(new X11DesktopWindowMoveClient); | 270 x11_window_move_client_.reset(new X11DesktopWindowMoveClient); |
271 aura::client::SetWindowMoveClient(root_window_->window(), | 271 aura::client::SetWindowMoveClient(root_window_->window(), |
272 x11_window_move_client_.get()); | 272 x11_window_move_client_.get()); |
273 | 273 |
274 native_widget_delegate_->OnNativeWidgetCreated(true); | 274 native_widget_delegate_->OnNativeWidgetCreated(true); |
275 } | 275 } |
(...skipping 1254 matching lines...) Loading... |
1530 if (linux_ui) { | 1530 if (linux_ui) { |
1531 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1531 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
1532 if (native_theme) | 1532 if (native_theme) |
1533 return native_theme; | 1533 return native_theme; |
1534 } | 1534 } |
1535 | 1535 |
1536 return ui::NativeTheme::instance(); | 1536 return ui::NativeTheme::instance(); |
1537 } | 1537 } |
1538 | 1538 |
1539 } // namespace views | 1539 } // namespace views |
OLD | NEW |