summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-03 16:22:35 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-03 16:22:35 +0000
commitaf7aa14b558f5b9230f67493bd425eedec010a8b (patch)
tree1519e8f39eb93433e7d4e59a33fbad1f55896760 /views
parent41098cc01eb8daa57f79bbc13a75b60787712432 (diff)
downloadchromium_src-af7aa14b558f5b9230f67493bd425eedec010a8b.zip
chromium_src-af7aa14b558f5b9230f67493bd425eedec010a8b.tar.gz
chromium_src-af7aa14b558f5b9230f67493bd425eedec010a8b.tar.bz2
Skip accelerator handling if there is a grabbed widget.
Grabbed widget in gtk should get all the mouse and keyboard events and we should respect that. BUG=<http://crosbug.com/2355> TEST=Verify 2nd issue of 2355 that combobox dropdown should not disappear after mouse release. Also verify that 1st ESC should clear off combo's dropdown and 2nd ESC should dismiss the dialog. Please also pay attention to other regressions related to accelerator keys on gtk (linux, linux_chromeos builds). Review URL: http://codereview.chromium.org/1727020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/focus/accelerator_handler_gtk.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/views/focus/accelerator_handler_gtk.cc b/views/focus/accelerator_handler_gtk.cc
index da7bd94..ede8e57 100644
--- a/views/focus/accelerator_handler_gtk.cc
+++ b/views/focus/accelerator_handler_gtk.cc
@@ -18,7 +18,10 @@ AcceleratorHandler::AcceleratorHandler() : last_key_pressed_(0) {
}
bool AcceleratorHandler::Dispatch(GdkEvent* event) {
- if (event->type != GDK_KEY_PRESS && event->type != GDK_KEY_RELEASE) {
+ // Let Gtk process the event if there is a grabbed widget or it's not
+ // a keyboard event.
+ if (gtk_grab_get_current() ||
+ (event->type != GDK_KEY_PRESS && event->type != GDK_KEY_RELEASE)) {
gtk_main_do_event(event);
return true;
}