summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 00:14:47 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 00:14:47 +0000
commitc485d4324208223a2495a9b5f6582e2ef285d3b2 (patch)
treee361699c6cc4958d5eef38c7a07c3f5710cea240 /chrome/browser/gtk
parente92070ac9982489502180c006fe7911889c8fbee (diff)
downloadchromium_src-c485d4324208223a2495a9b5f6582e2ef285d3b2.zip
chromium_src-c485d4324208223a2495a9b5f6582e2ef285d3b2.tar.gz
chromium_src-c485d4324208223a2495a9b5f6582e2ef285d3b2.tar.bz2
Filter modifier to only include accelerator modifiers.
Review URL: http://codereview.chromium.org/99103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index c141659a..63596a4 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -130,6 +130,9 @@ const struct AcceleratorMapping {
int GetCommandId(guint accel_key, GdkModifierType modifier) {
// Bug 9806: If capslock is on, we will get a capital letter as accel_key.
accel_key = gdk_keyval_to_lower(accel_key);
+ // Filter modifier to only include accelerator modifiers.
+ modifier = static_cast<GdkModifierType>(
+ modifier & gtk_accelerator_get_default_mod_mask());
for (size_t i = 0; i < arraysize(kAcceleratorMap); ++i) {
if (kAcceleratorMap[i].keyval == accel_key &&
kAcceleratorMap[i].modifier_type == modifier)