diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-18 23:31:10 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-18 23:31:10 +0000 |
commit | 3b5965c5fc88d13789bc7bed97ecbb5a9b240b11 (patch) | |
tree | 867c03997d456b8ec26256cf5abea149de87ecab /views | |
parent | a594ec7ef000f1417e5148d7e051d3de1744be45 (diff) | |
download | chromium_src-3b5965c5fc88d13789bc7bed97ecbb5a9b240b11.zip chromium_src-3b5965c5fc88d13789bc7bed97ecbb5a9b240b11.tar.gz chromium_src-3b5965c5fc88d13789bc7bed97ecbb5a9b240b11.tar.bz2 |
Fixes crash in views/gtk when pressing space bar on a menu button.
BUG=49366
TEST=see bug
Review URL: http://codereview.chromium.org/3046002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52874 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/menu_controller.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc index 2622523..22540e3 100644 --- a/views/controls/menu/menu_controller.cc +++ b/views/controls/menu/menu_controller.cc @@ -822,8 +822,14 @@ bool MenuController::Dispatch(GdkEvent* event) { case GDK_KEY_PRESS: { base::KeyboardCode win_keycode = base::WindowsKeyCodeForGdkKeyCode(event->key.keyval); + if (!OnKeyDown(win_keycode)) return false; + + // OnKeyDown may have set exit_type_. + if (exit_type_ != EXIT_NONE) + return false; + guint32 keycode = gdk_keyval_to_unicode(event->key.keyval); if (keycode) return !SelectByChar(keycode); |