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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 drag_drop_client_(NULL), | 134 drag_drop_client_(NULL), |
135 current_cursor_(ui::kCursorNull), | 135 current_cursor_(ui::kCursorNull), |
136 native_widget_delegate_(native_widget_delegate), | 136 native_widget_delegate_(native_widget_delegate), |
137 desktop_native_widget_aura_(desktop_native_widget_aura), | 137 desktop_native_widget_aura_(desktop_native_widget_aura), |
138 content_window_(NULL), | 138 content_window_(NULL), |
139 window_parent_(NULL), | 139 window_parent_(NULL), |
140 custom_window_shape_(NULL) { | 140 custom_window_shape_(NULL) { |
141 } | 141 } |
142 | 142 |
143 DesktopRootWindowHostX11::~DesktopRootWindowHostX11() { | 143 DesktopRootWindowHostX11::~DesktopRootWindowHostX11() { |
| 144 DestroyCompositor(); |
144 root_window_->window()->ClearProperty(kHostForRootWindow); | 145 root_window_->window()->ClearProperty(kHostForRootWindow); |
145 aura::client::SetWindowMoveClient(root_window_->window(), NULL); | 146 aura::client::SetWindowMoveClient(root_window_->window(), NULL); |
146 desktop_native_widget_aura_->OnDesktopRootWindowHostDestroyed(root_window_); | 147 desktop_native_widget_aura_->OnDesktopRootWindowHostDestroyed(root_window_); |
147 if (custom_window_shape_) | 148 if (custom_window_shape_) |
148 XDestroyRegion(custom_window_shape_); | 149 XDestroyRegion(custom_window_shape_); |
149 } | 150 } |
150 | 151 |
151 // static | 152 // static |
152 aura::Window* DesktopRootWindowHostX11::GetContentWindowForXID(XID xid) { | 153 aura::Window* DesktopRootWindowHostX11::GetContentWindowForXID(XID xid) { |
153 aura::RootWindow* root = aura::RootWindow::GetForAcceleratedWidget(xid); | 154 aura::RootWindow* root = aura::RootWindow::GetForAcceleratedWidget(xid); |
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1540 if (linux_ui) { | 1541 if (linux_ui) { |
1541 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1542 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
1542 if (native_theme) | 1543 if (native_theme) |
1543 return native_theme; | 1544 return native_theme; |
1544 } | 1545 } |
1545 | 1546 |
1546 return ui::NativeTheme::instance(); | 1547 return ui::NativeTheme::instance(); |
1547 } | 1548 } |
1548 | 1549 |
1549 } // namespace views | 1550 } // namespace views |
OLD | NEW |