Chromium Code Reviews| Index: views/controls/menu/menu_controller.cc |
| diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc |
| index e0701a2cb9a9cf8d3a43c5595dbbe36ac2304254..b98f5b883129ad7a534fddeb6b44b3c72617831f 100644 |
| --- a/views/controls/menu/menu_controller.cc |
| +++ b/views/controls/menu/menu_controller.cc |
| @@ -861,7 +861,15 @@ bool MenuController::Dispatch(GdkEvent* event) { |
| #if defined(TOUCH_UI) |
| bool MenuController::Dispatch(XEvent* xev) { |
| - return DispatchXEvent(xev); |
| + if (!DispatchXEvent(xev)) |
| + return false; |
| + |
| + // The event was handled and |exit_type_| was set. So terminate the event-loop |
| + // that was started in MenuController::Run. |
| + if (exit_type_ != EXIT_NONE) { |
| + MessageLoopForUI::current()->QuitNow(); |
|
sky
2010/11/22 17:06:15
How come you need the QuitNow instead of returning
sadrul
2010/11/22 18:48:22
Dispatch(XEvent*) returns a value indicating wheth
sky
2010/11/22 19:23:01
The docs don't indicate that. Doesn't that make fo
|
| + } |
| + return true; |
| } |
| #endif |