Index: base/message_pump_gtk.cc |
=================================================================== |
--- base/message_pump_gtk.cc (revision 132496) |
+++ base/message_pump_gtk.cc (working copy) |
@@ -88,7 +88,13 @@ |
// static |
Display* MessagePumpGtk::GetDefaultXDisplay() { |
darin (slow to review)
2012/04/23 16:52:57
why do we need to involve a class named *Gtk in co
|
static GdkDisplay* display = gdk_display_get_default(); |
- return display ? GDK_DISPLAY_XDISPLAY(display) : NULL; |
+ if (!display) { |
+ // GTK / GDK has not been initialized, which is a decision we wish to |
+ // support, for example for the GPU process. |
+ static Display* xdisplay = XOpenDisplay(NULL); |
+ return xdisplay; |
+ } |
+ return GDK_DISPLAY_XDISPLAY(display); |
} |
void MessagePumpGtk::WillProcessEvent(GdkEvent* event) { |