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

Unified Diff: ui/gfx/x/x11_types.cc

Issue 2199063003: Linux: Add xcb FD to glib event loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor Created 4 years, 4 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/gfx/x/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/x/x11_types.cc
diff --git a/ui/gfx/x/x11_types.cc b/ui/gfx/x/x11_types.cc
index 7540f8ae2887cbcdcebf09982790a8a8ba797314..646d678079465782373604fb51825e8a4e696d8d 100644
--- a/ui/gfx/x/x11_types.cc
+++ b/ui/gfx/x/x11_types.cc
@@ -5,6 +5,8 @@
#include "ui/gfx/x/x11_types.h"
#include <X11/Xlib.h>
+#include <xcb/xcb.h>
+#include <X11/Xlib-xcb.h>
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
@@ -26,7 +28,14 @@ XDisplay* OpenNewXDisplay() {
#else
std::string display_str = base::CommandLine::ForCurrentProcess()->
GetSwitchValueASCII(switches::kX11Display);
- return XOpenDisplay(display_str.empty() ? NULL : display_str.c_str());
+ // TODO(thomasanderson): Do not upload this. Remove once builders pass.
+ xcb_connection_t* connection =
+ xcb_connect(display_str.empty() ? NULL : display_str.c_str(), nullptr);
+ (void)connection;
+ XDisplay* display =
+ XOpenDisplay(display_str.empty() ? NULL : display_str.c_str());
+ (void)XGetXCBConnection(display);
+ return display;
#endif
}
@@ -173,4 +182,3 @@ void PutARGBImage(XDisplay* display,
}
} // namespace gfx
-
« no previous file with comments | « ui/gfx/x/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698