From 6c5e5d09cb13989e21c7d533e9c0332feb3f0208 Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Tue, 10 Apr 2012 11:31:49 +0900 Subject: [PATCH] Ignore mouse masks in ui/gtk3/keybindingmanager for accessibility. TEST=Linux desktop Review URL: https://codereview.appspot.com/5975069 --- ui/gtk3/keybindingmanager.vala | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/gtk3/keybindingmanager.vala b/ui/gtk3/keybindingmanager.vala index 0b588da..dd3c7bd 100644 --- a/ui/gtk3/keybindingmanager.vala +++ b/ui/gtk3/keybindingmanager.vala @@ -36,7 +36,12 @@ public class KeybindingManager : GLib.Object { Gdk.ModifierType.MOD2_MASK | Gdk.ModifierType.LOCK_MASK | Gdk.ModifierType.MOD4_MASK | - Gdk.ModifierType.MOD5_MASK); + Gdk.ModifierType.MOD5_MASK | + Gdk.ModifierType.BUTTON1_MASK | + Gdk.ModifierType.BUTTON2_MASK | + Gdk.ModifierType.BUTTON3_MASK | + Gdk.ModifierType.BUTTON4_MASK | + Gdk.ModifierType.BUTTON5_MASK); /** * Helper class to store keybinding @@ -85,8 +90,6 @@ public class KeybindingManager : GLib.Object { Gdk.ModifierType modifiers; Gtk.accelerator_parse(accelerator, out keysym, out modifiers); - get_primary_modifier(modifiers); - unowned X.Display display = Gdk.x11_get_default_xdisplay(); int keycode = display.keysym_to_keycode(keysym); @@ -147,7 +150,7 @@ public class KeybindingManager : GLib.Object { Gdk.ModifierType.SHIFT_MASK, Gdk.ModifierType.LOCK_MASK }; - foreach (var mask in masks) { + foreach (uint mask in masks) { if ((binding_mask & mask) == mask) return mask; } -- 2.7.4