| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 345 |
| 346 bool DesktopRootWindowHostX11::IsVisible() const { | 346 bool DesktopRootWindowHostX11::IsVisible() const { |
| 347 return window_mapped_; | 347 return window_mapped_; |
| 348 } | 348 } |
| 349 | 349 |
| 350 void DesktopRootWindowHostX11::SetSize(const gfx::Size& size) { | 350 void DesktopRootWindowHostX11::SetSize(const gfx::Size& size) { |
| 351 // TODO(erg): | 351 // TODO(erg): |
| 352 NOTIMPLEMENTED(); | 352 NOTIMPLEMENTED(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void DesktopRootWindowHostX11::StackAtTop() { |
| 356 XRaiseWindow(xdisplay_, xwindow_); |
| 357 } |
| 358 |
| 355 void DesktopRootWindowHostX11::CenterWindow(const gfx::Size& size) { | 359 void DesktopRootWindowHostX11::CenterWindow(const gfx::Size& size) { |
| 356 gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen(); | 360 gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen(); |
| 357 | 361 |
| 358 // If |window_|'s transient parent bounds are big enough to contain |size|, | 362 // If |window_|'s transient parent bounds are big enough to contain |size|, |
| 359 // use them instead. | 363 // use them instead. |
| 360 if (content_window_->transient_parent()) { | 364 if (content_window_->transient_parent()) { |
| 361 gfx::Rect transient_parent_rect = | 365 gfx::Rect transient_parent_rect = |
| 362 content_window_->transient_parent()->GetBoundsInScreen(); | 366 content_window_->transient_parent()->GetBoundsInScreen(); |
| 363 if (transient_parent_rect.height() >= size.height() && | 367 if (transient_parent_rect.height() >= size.height() && |
| 364 transient_parent_rect.width() >= size.width()) { | 368 transient_parent_rect.width() >= size.width()) { |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 if (linux_ui) { | 1525 if (linux_ui) { |
| 1522 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1526 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
| 1523 if (native_theme) | 1527 if (native_theme) |
| 1524 return native_theme; | 1528 return native_theme; |
| 1525 } | 1529 } |
| 1526 | 1530 |
| 1527 return ui::NativeTheme::instance(); | 1531 return ui::NativeTheme::instance(); |
| 1528 } | 1532 } |
| 1529 | 1533 |
| 1530 } // namespace views | 1534 } // namespace views |
| OLD | NEW |