[gnome-music] window: Fix keyboard shortcuts



commit 75f36957dcbb37c6a159778ec9c8492fc8c0c21d
Author: Christophe Van den Abbeele <christophe vda protonmail com>
Date:   Sat Oct 20 20:32:34 2018 +0200

    window: Fix keyboard shortcuts
    
    Keyboard shortcuts sometimes do not work, because the check for the
    modifiers does not include the default modifier mask. This causes an
    activated numlock or shiftlock to disable keyboard shortcuts. Adding the
    mask fixes this problem.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-music/issues/238

 gnomemusic/window.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index a08397d0..82dfba5d 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -284,7 +284,7 @@ class Window(Gtk.ApplicationWindow):
 
     @log
     def _on_key_press(self, widget, event):
-        modifiers = event.get_state()
+        modifiers = event.get_state() & Gtk.accelerator_get_default_mod_mask()
         (_, keyval) = event.get_keyval()
 
         control_mask = Gdk.ModifierType.CONTROL_MASK


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]