| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace | 124 } // namespace |
| 125 | 125 |
| 126 //////////////////////////////////////////////////////////////////////////////// | 126 //////////////////////////////////////////////////////////////////////////////// |
| 127 // DesktopWindowTreeHostX11, public: | 127 // DesktopWindowTreeHostX11, public: |
| 128 | 128 |
| 129 DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( | 129 DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( |
| 130 internal::NativeWidgetDelegate* native_widget_delegate, | 130 internal::NativeWidgetDelegate* native_widget_delegate, |
| 131 DesktopNativeWidgetAura* desktop_native_widget_aura) | 131 DesktopNativeWidgetAura* desktop_native_widget_aura) |
| 132 : close_widget_factory_(this), | 132 : xdisplay_(gfx::GetXDisplay()), |
| 133 xdisplay_(gfx::GetXDisplay()), | |
| 134 xwindow_(0), | 133 xwindow_(0), |
| 135 x_root_window_(DefaultRootWindow(xdisplay_)), | 134 x_root_window_(DefaultRootWindow(xdisplay_)), |
| 136 atom_cache_(xdisplay_, kAtomsToCache), | 135 atom_cache_(xdisplay_, kAtomsToCache), |
| 137 window_mapped_(false), | 136 window_mapped_(false), |
| 138 is_fullscreen_(false), | 137 is_fullscreen_(false), |
| 139 is_always_on_top_(false), | 138 is_always_on_top_(false), |
| 140 use_native_frame_(false), | 139 use_native_frame_(false), |
| 141 should_maximize_after_map_(false), | 140 should_maximize_after_map_(false), |
| 142 use_argb_visual_(false), | 141 use_argb_visual_(false), |
| 143 drag_drop_client_(NULL), | 142 drag_drop_client_(NULL), |
| 144 native_widget_delegate_(native_widget_delegate), | 143 native_widget_delegate_(native_widget_delegate), |
| 145 desktop_native_widget_aura_(desktop_native_widget_aura), | 144 desktop_native_widget_aura_(desktop_native_widget_aura), |
| 146 content_window_(NULL), | 145 content_window_(NULL), |
| 147 window_parent_(NULL), | 146 window_parent_(NULL), |
| 148 window_shape_(NULL), | 147 window_shape_(NULL), |
| 149 custom_window_shape_(false), | 148 custom_window_shape_(false), |
| 150 urgency_hint_set_(false) { | 149 urgency_hint_set_(false), |
| 150 close_widget_factory_(this) { |
| 151 } | 151 } |
| 152 | 152 |
| 153 DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() { | 153 DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() { |
| 154 window()->ClearProperty(kHostForRootWindow); | 154 window()->ClearProperty(kHostForRootWindow); |
| 155 aura::client::SetWindowMoveClient(window(), NULL); | 155 aura::client::SetWindowMoveClient(window(), NULL); |
| 156 desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this); | 156 desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this); |
| 157 if (window_shape_) | 157 if (window_shape_) |
| 158 XDestroyRegion(window_shape_); | 158 XDestroyRegion(window_shape_); |
| 159 DestroyDispatcher(); | 159 DestroyDispatcher(); |
| 160 } | 160 } |
| (...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1934 if (linux_ui) { | 1934 if (linux_ui) { |
| 1935 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1935 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 1936 if (native_theme) | 1936 if (native_theme) |
| 1937 return native_theme; | 1937 return native_theme; |
| 1938 } | 1938 } |
| 1939 | 1939 |
| 1940 return ui::NativeTheme::instance(); | 1940 return ui::NativeTheme::instance(); |
| 1941 } | 1941 } |
| 1942 | 1942 |
| 1943 } // namespace views | 1943 } // namespace views |
| OLD | NEW |