Index: content/browser/browser_main_loop.cc |
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
index 1fd90e6e33c619fe6634c4d2d74e527351a91335..c56d426445c04239ed4cdbe4a5439a62eeda33b4 100644 |
--- a/content/browser/browser_main_loop.cc |
+++ b/content/browser/browser_main_loop.cc |
@@ -1410,11 +1410,14 @@ bool BrowserMainLoop::InitializeToolkit() { |
#if !defined(OS_CHROMEOS) |
// InitializeToolkit is called before CreateStartupTasks which one starts the |
// gpu process. |
+ Visual* visual = NULL; |
int depth = 0; |
- ui::ChooseVisualForWindow(NULL, &depth); |
+ ui::ChooseVisualForWindow(&visual, &depth); |
DCHECK(depth > 0); |
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
switches::kWindowDepth, base::IntToString(depth)); |
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
+ switches::kX11VisualID, base::UintToString(visual->visualid)); |
#endif |
#endif |