summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-20 22:29:42 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-20 22:29:42 +0000
commit93df9c4e0accc274dd90dde249224be03ed27e98 (patch)
tree302dd9fdc5814d4be0a45c25d4849207a5f2fdb9 /base
parentc5d3ad11efe12e907e0089c4547c13d9bf862a9b (diff)
downloadchromium_src-93df9c4e0accc274dd90dde249224be03ed27e98.zip
chromium_src-93df9c4e0accc274dd90dde249224be03ed27e98.tar.gz
chromium_src-93df9c4e0accc274dd90dde249224be03ed27e98.tar.bz2
Final(?) eradications of GDK / GTK from the GPU process.
TBR=darin Review URL: https://chromiumcodereview.appspot.com/10078018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/message_pump_gtk.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/base/message_pump_gtk.cc b/base/message_pump_gtk.cc
index 2c526ca..d56922f 100644
--- a/base/message_pump_gtk.cc
+++ b/base/message_pump_gtk.cc
@@ -88,7 +88,13 @@ void MessagePumpGtk::DispatchEvents(GdkEvent* event) {
// static
Display* MessagePumpGtk::GetDefaultXDisplay() {
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) {