| 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 restored_bounds_ = restored_bounds; | 346 restored_bounds_ = restored_bounds; |
| 347 Maximize(); | 347 Maximize(); |
| 348 Show(); | 348 Show(); |
| 349 } | 349 } |
| 350 | 350 |
| 351 bool DesktopRootWindowHostX11::IsVisible() const { | 351 bool DesktopRootWindowHostX11::IsVisible() const { |
| 352 return window_mapped_; | 352 return window_mapped_; |
| 353 } | 353 } |
| 354 | 354 |
| 355 void DesktopRootWindowHostX11::SetSize(const gfx::Size& size) { | 355 void DesktopRootWindowHostX11::SetSize(const gfx::Size& size) { |
| 356 // TODO(erg): | 356 XResizeWindow(xdisplay_, xwindow_, size.width(), size.height()); |
| 357 NOTIMPLEMENTED(); | |
| 358 } | 357 } |
| 359 | 358 |
| 360 void DesktopRootWindowHostX11::StackAtTop() { | 359 void DesktopRootWindowHostX11::StackAtTop() { |
| 361 XRaiseWindow(xdisplay_, xwindow_); | 360 XRaiseWindow(xdisplay_, xwindow_); |
| 362 } | 361 } |
| 363 | 362 |
| 364 void DesktopRootWindowHostX11::CenterWindow(const gfx::Size& size) { | 363 void DesktopRootWindowHostX11::CenterWindow(const gfx::Size& size) { |
| 365 gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen(); | 364 gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen(); |
| 366 | 365 |
| 367 // If |window_|'s transient parent bounds are big enough to contain |size|, | 366 // If |window_|'s transient parent bounds are big enough to contain |size|, |
| (...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 if (linux_ui) { | 1539 if (linux_ui) { |
| 1541 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1540 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
| 1542 if (native_theme) | 1541 if (native_theme) |
| 1543 return native_theme; | 1542 return native_theme; |
| 1544 } | 1543 } |
| 1545 | 1544 |
| 1546 return ui::NativeTheme::instance(); | 1545 return ui::NativeTheme::instance(); |
| 1547 } | 1546 } |
| 1548 | 1547 |
| 1549 } // namespace views | 1548 } // namespace views |
| OLD | NEW |