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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 Show(); | 351 Show(); |
352 } | 352 } |
353 | 353 |
354 bool DesktopWindowTreeHostX11::IsVisible() const { | 354 bool DesktopWindowTreeHostX11::IsVisible() const { |
355 return window_mapped_; | 355 return window_mapped_; |
356 } | 356 } |
357 | 357 |
358 void DesktopWindowTreeHostX11::SetSize(const gfx::Size& size) { | 358 void DesktopWindowTreeHostX11::SetSize(const gfx::Size& size) { |
359 bool size_changed = bounds_.size() != size; | 359 bool size_changed = bounds_.size() != size; |
360 XResizeWindow(xdisplay_, xwindow_, size.width(), size.height()); | 360 XResizeWindow(xdisplay_, xwindow_, size.width(), size.height()); |
| 361 bounds_.set_size(size); |
361 if (size_changed) | 362 if (size_changed) |
362 NotifyHostResized(size); | 363 NotifyHostResized(size); |
363 } | 364 } |
364 | 365 |
365 void DesktopWindowTreeHostX11::StackAtTop() { | 366 void DesktopWindowTreeHostX11::StackAtTop() { |
366 XRaiseWindow(xdisplay_, xwindow_); | 367 XRaiseWindow(xdisplay_, xwindow_); |
367 } | 368 } |
368 | 369 |
369 void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) { | 370 void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) { |
370 gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen(); | 371 gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen(); |
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 if (linux_ui) { | 1547 if (linux_ui) { |
1547 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1548 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
1548 if (native_theme) | 1549 if (native_theme) |
1549 return native_theme; | 1550 return native_theme; |
1550 } | 1551 } |
1551 | 1552 |
1552 return ui::NativeTheme::instance(); | 1553 return ui::NativeTheme::instance(); |
1553 } | 1554 } |
1554 | 1555 |
1555 } // namespace views | 1556 } // namespace views |
OLD | NEW |