| 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_window_tree_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 | 1535 |
| 1536 // If we have a parent, record the parent/child relationship. We use this | 1536 // If we have a parent, record the parent/child relationship. We use this |
| 1537 // data during destruction to make sure that when we try to close a parent | 1537 // data during destruction to make sure that when we try to close a parent |
| 1538 // window, we also destroy all child windows. | 1538 // window, we also destroy all child windows. |
| 1539 if (params.parent && params.parent->GetHost()) { | 1539 if (params.parent && params.parent->GetHost()) { |
| 1540 XID parent_xid = | 1540 XID parent_xid = |
| 1541 params.parent->GetHost()->GetAcceleratedWidget(); | 1541 params.parent->GetHost()->GetAcceleratedWidget(); |
| 1542 window_parent_ = GetHostForXID(parent_xid); | 1542 window_parent_ = GetHostForXID(parent_xid); |
| 1543 DCHECK(window_parent_); | 1543 DCHECK(window_parent_); |
| 1544 window_parent_->window_children_.insert(this); | 1544 window_parent_->window_children_.insert(this); |
| 1545 wm::AddTransientChild(params.parent, content_window_); |
| 1545 } | 1546 } |
| 1546 | 1547 |
| 1547 // If we have a delegate which is providing a default window icon, use that | 1548 // If we have a delegate which is providing a default window icon, use that |
| 1548 // icon. | 1549 // icon. |
| 1549 gfx::ImageSkia* window_icon = | 1550 gfx::ImageSkia* window_icon = |
| 1550 ViewsDelegate::GetInstance() | 1551 ViewsDelegate::GetInstance() |
| 1551 ? ViewsDelegate::GetInstance()->GetDefaultWindowIcon() | 1552 ? ViewsDelegate::GetInstance()->GetDefaultWindowIcon() |
| 1552 : NULL; | 1553 : NULL; |
| 1553 if (window_icon) { | 1554 if (window_icon) { |
| 1554 SetWindowIcons(gfx::ImageSkia(), *window_icon); | 1555 SetWindowIcons(gfx::ImageSkia(), *window_icon); |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2357 | 2358 |
| 2358 // static | 2359 // static |
| 2359 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 2360 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 2360 internal::NativeWidgetDelegate* native_widget_delegate, | 2361 internal::NativeWidgetDelegate* native_widget_delegate, |
| 2361 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 2362 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 2362 return new DesktopWindowTreeHostX11(native_widget_delegate, | 2363 return new DesktopWindowTreeHostX11(native_widget_delegate, |
| 2363 desktop_native_widget_aura); | 2364 desktop_native_widget_aura); |
| 2364 } | 2365 } |
| 2365 | 2366 |
| 2366 } // namespace views | 2367 } // namespace views |
| OLD | NEW |