Index: ui/aura/desktop.cc |
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc |
index a4aa58e1bd8c7bd611e005163bd88439227e22ed..0ccb40bf6af8675c37e5c610b3e7c96739b32806 100644 |
--- a/ui/aura/desktop.cc |
+++ b/ui/aura/desktop.cc |
@@ -32,6 +32,10 @@ |
#include "ui/gfx/compositor/compositor_cc.h" |
#endif |
+#if defined(USE_X11) |
+#include "base/message_pump_x.h" |
+#endif |
+ |
using std::string; |
using std::vector; |
@@ -132,9 +136,16 @@ Desktop::Desktop() |
host_->GetSize()); |
} |
DCHECK(compositor_.get()); |
+#if defined(USE_X11) |
+ base::MessagePumpX::SetDefaultDispatcher(host_.get()); |
+#endif |
} |
Desktop::~Desktop() { |
+#if defined(USE_X11) |
+ base::MessagePumpX::SetDefaultDispatcher(NULL); |
+#endif |
+ |
in_destructor_ = true; |
#ifdef USE_WEBKIT_COMPOSITOR |
if (!ui::Compositor::compositor_factory()) |
@@ -188,7 +199,7 @@ void Desktop::SetCursor(gfx::NativeCursor cursor) { |
void Desktop::Run() { |
ShowDesktop(); |
- MessageLoopForUI::current()->RunWithDispatcher(host_.get()); |
+ MessageLoopForUI::current()->Run(); |
} |
void Desktop::Draw() { |