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

Unified Diff: ui/base/x/x11_util.cc

Issue 1998653002: Make DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() relies on argb visual flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually no need to relax since Xvfb supports 32 depth, it just does not set _NET_WM_CM_S0 bit. Created 4 years, 7 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 | « no previous file | ui/views/test/widget_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/x11_util.cc
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index db9af3ce741f6e1342726fe1ef11cf4f291f8f3e..476a19e88584e54d96708dba65e17007a61ea538 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -1420,11 +1420,19 @@ void ChooseVisualForWindow(Visual** visual, int* depth) {
if (!s_visual) {
XDisplay* display = gfx::GetXDisplay();
- XAtom NET_WM_CM_S0 = XInternAtom(display, "_NET_WM_CM_S0", False);
+
+ // Xvfb support 32 bit depths. But for some reasons NET_WM_CM_S0 it not set
+ // so at check for Composite extension instead.
+ int opcode = 0;
+ int eventb = 0;
+ int errorb = 0;
+ bool has_composite_ext =
+ XQueryExtension(display, "Composite", &opcode, &eventb, &errorb);
+ // XAtom NET_WM_CM_S0 = XInternAtom(display, "_NET_WM_CM_S0", False);
piman 2016/05/20 20:40:38 This is not right. The Composite extension may exi
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableTransparentVisuals) &&
- XGetSelectionOwner(display, NET_WM_CM_S0) != None) {
+ has_composite_ext) {
// Choose the first ARGB8888 visual
XVisualInfo visual_template;
visual_template.screen = 0;
« no previous file with comments | « no previous file | ui/views/test/widget_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698