Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 1998653002: Make DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() relies on argb visual flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove TODO/CHECK since Win10 bots can run tests with AeroGlass enabled Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/test/widget_test_mac.mm ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..82ba30c804f47a2689399431ec8be909a582cc4e 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,10 @@ void DesktopWindowTreeHostX11::InitX11Window(
attribute_mask |= CWBorderPixel;
swa.border_pixel = 0;
- use_argb_visual_ = true;
+ // A compositing manager is required to support transparency.
+ use_argb_visual_ =
+ XGetSelectionOwner(xdisplay_, atom_cache_.GetAtom("_NET_WM_CM_S0")) !=
+ None;
}
bounds_in_pixels_ = ToPixelRect(params.bounds);
« no previous file with comments | « ui/views/test/widget_test_mac.mm ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698