Chromium Code Reviews| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 406 bool size_changed = bounds_in_pixels_.size() != size_in_pixels; | 406 bool size_changed = bounds_in_pixels_.size() != size_in_pixels; |
| 407 XResizeWindow(xdisplay_, xwindow_, size_in_pixels.width(), | 407 XResizeWindow(xdisplay_, xwindow_, size_in_pixels.width(), |
| 408 size_in_pixels.height()); | 408 size_in_pixels.height()); |
| 409 bounds_in_pixels_.set_size(size_in_pixels); | 409 bounds_in_pixels_.set_size(size_in_pixels); |
| 410 if (size_changed) { | 410 if (size_changed) { |
| 411 OnHostResized(size_in_pixels); | 411 OnHostResized(size_in_pixels); |
| 412 ResetWindowRegion(); | 412 ResetWindowRegion(); |
| 413 } | 413 } |
| 414 } | 414 } |
| 415 | 415 |
| 416 void DesktopWindowTreeHostX11::StackAbove(aura::Window* window) { | |
| 417 } | |
|
sky
2015/06/02 16:32:57
Is it not possible to implement this on X?
vasilii
2015/06/03 13:47:38
The bubble isn't an X window.
I think it's doable
| |
| 418 | |
| 416 void DesktopWindowTreeHostX11::StackAtTop() { | 419 void DesktopWindowTreeHostX11::StackAtTop() { |
| 417 XRaiseWindow(xdisplay_, xwindow_); | 420 XRaiseWindow(xdisplay_, xwindow_); |
| 418 } | 421 } |
| 419 | 422 |
| 420 void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) { | 423 void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) { |
| 421 gfx::Size size_in_pixels = ToPixelRect(gfx::Rect(size)).size(); | 424 gfx::Size size_in_pixels = ToPixelRect(gfx::Rect(size)).size(); |
| 422 gfx::Rect parent_bounds_in_pixels = GetWorkAreaBoundsInPixels(); | 425 gfx::Rect parent_bounds_in_pixels = GetWorkAreaBoundsInPixels(); |
| 423 | 426 |
| 424 // If |window_|'s transient parent bounds are big enough to contain |size|, | 427 // If |window_|'s transient parent bounds are big enough to contain |size|, |
| 425 // use them instead. | 428 // use them instead. |
| (...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1997 if (linux_ui) { | 2000 if (linux_ui) { |
| 1998 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2001 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 1999 if (native_theme) | 2002 if (native_theme) |
| 2000 return native_theme; | 2003 return native_theme; |
| 2001 } | 2004 } |
| 2002 | 2005 |
| 2003 return ui::NativeTheme::instance(); | 2006 return ui::NativeTheme::instance(); |
| 2004 } | 2007 } |
| 2005 | 2008 |
| 2006 } // namespace views | 2009 } // namespace views |
| OLD | NEW |