Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2458)

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 99103: Filter modifier to only include accelerator modifiers. (Closed)
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.cc
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index c141659a060cbe694f938a5cc52a75ad625f2076..63596a46b3612b9fa4790dac792913db9d077c05 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698