Chromium Code Reviews| Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
| diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
| index 586d36ddd81e4636a72c8d4fdd2745dd260045cd..161562a0d22751c72ef9d5643d2e8f17c58a15ba 100644 |
| --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
| +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
| @@ -784,7 +784,7 @@ bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() const { |
| } |
| bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { |
| - return false; |
| + return IsTranslucentWindowOpacitySupported(); |
| } |
| void DesktopWindowTreeHostX11::FrameTypeChanged() { |
| @@ -940,7 +940,7 @@ bool DesktopWindowTreeHostX11::IsAnimatingClosed() const { |
| } |
| bool DesktopWindowTreeHostX11::IsTranslucentWindowOpacitySupported() const { |
| - return false; |
| + return use_argb_visual_; |
| } |
| void DesktopWindowTreeHostX11::SizeConstraintsChanged() { |
| @@ -1148,7 +1148,9 @@ void DesktopWindowTreeHostX11::InitX11Window( |
| attribute_mask |= CWBorderPixel; |
| swa.border_pixel = 0; |
| - use_argb_visual_ = true; |
| + // A compositing manager is required to support transparency. |
| + XAtom NET_WM_CM_S0 = XInternAtom(xdisplay_, "_NET_WM_CM_S0", False); |
|
sadrul
2016/06/24 03:55:13
Use atom_cache_.GetAtom("_NET_WM_CM_S0") instead
Julien Isorce Samsung
2016/06/24 05:25:19
Done.
|
| + use_argb_visual_ = XGetSelectionOwner(xdisplay_, NET_WM_CM_S0) != None; |
| } |
| bounds_in_pixels_ = ToPixelRect(params.bounds); |