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