Chromium Code Reviews| 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; |