[gnome-music/cherry-pick-75f36957] window: Fix keyboard shortcuts



commit 2ad3df5416e72d4507fe3425c78bf3cfc568e19b
Author: Christophe Van den Abbeele <christophe vda protonmail com>
Date:   Sat Oct 20 18:32:34 2018 +0000

    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
    
    
    (cherry picked from commit 75f36957dcbb37c6a159778ec9c8492fc8c0c21d)

 gnomemusic/window.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index b1cd36ae..c0e66d02 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -291,7 +291,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]