// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#if defined(USE_X11)
-#include <X11/Xlib.h>
-#endif
-
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#if !defined(OS_CHROMEOS)
#include "ui/views/widget/desktop_aura/desktop_screen.h"
#endif
+
#if defined(OS_WIN)
#include "ui/base/win/scoped_ole_initializer.h"
#endif
+#if defined(USE_X11)
+#include "ui/gfx/x/x11_connection.h"
+#endif
+
int main(int argc, char** argv) {
#if defined(OS_WIN)
ui::ScopedOleInitializer ole_initializer_;
#if defined(USE_X11)
// This demo uses InProcessContextFactory which uses X on a separate Gpu
// thread.
- XInitThreads();
+ gfx::InitializeThreadedX11();
#endif
gfx::GLSurface::InitializeOneOff();
ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
- aura::Env::CreateInstance();
+ aura::Env::CreateInstance(true);
ui::InitializeInputMethodForTesting();