diff options
author | Kristian Monsen <kristianm@google.com> | 2011-05-24 16:24:13 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-05-25 14:13:32 +0100 |
commit | 3f50c38dc070f4bb515c1b64450dae14f316474e (patch) | |
tree | 29f309f9534e05c47244eedb438fc612578d133b /base/message_pump_glib_x.cc | |
parent | e23bef148f7be2bdf9c3cb2cd3aa5ceebf1190fb (diff) | |
download | external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.zip external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.tar.gz external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.tar.bz2 |
Merge Chromium at r10.0.634.0: Initial merge by git.
Change-Id: Iac2af492818d119bcc2562eb5fdabf5ab0b6df9c
Diffstat (limited to 'base/message_pump_glib_x.cc')
-rw-r--r-- | base/message_pump_glib_x.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/message_pump_glib_x.cc b/base/message_pump_glib_x.cc index 26c4b87..775e940 100644 --- a/base/message_pump_glib_x.cc +++ b/base/message_pump_glib_x.cc @@ -84,6 +84,9 @@ MessagePumpGlibX::~MessagePumpGlibX() { bool MessagePumpGlibX::RunOnce(GMainContext* context, bool block) { GdkDisplay* gdisp = gdk_display_get_default(); + if (!gdisp) + return MessagePumpForUI::RunOnce(context, block); + Display* display = GDK_DISPLAY_XDISPLAY(gdisp); bool should_quit = false; @@ -189,6 +192,9 @@ void MessagePumpGlibX::InitializeEventsToCapture(void) { #if defined(HAVE_XINPUT2) void MessagePumpGlibX::InitializeXInput2(void) { GdkDisplay* display = gdk_display_get_default(); + if (!display) + return; + Display* xdisplay = GDK_DISPLAY_XDISPLAY(display); int event, err; |