[meld] Clear keymask whenever we get ISO_Prev_Group (workaround for bgo#584342)



commit a43f8ca147f0b6637858bcb556027abbcbfc7650
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Fri Feb 26 11:05:49 2010 +1000

    Clear keymask whenever we get ISO_Prev_Group (workaround for bgo#584342)
    
    The central bar in Meld has different actions depending on what modifiers
    are active when clicking. These modifiers don't always clear correctly
    however. Specifically, layout switching is broken because it doesn't send
    the correct key release event; it sometimes sends ISO_Prev_Group instead.
    
    This patch works around the issue by always clearing the keymask whenever
    we get an ISO_Prev_Group. This should fix many more problems than it
    causes, but it's wrong and ugly. Unfortunately, a proper fix has to happen
    upstream.
    
    The same bug affects GIMP: https://bugzilla.gnome.org/show_bug.cgi?id=457288
    
    Upstream X.org bug at: https://bugs.freedesktop.org/show_bug.cgi?id=7430

 meld/filediff.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index e5e8140..8a7e5ff 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -378,6 +378,10 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
         if self.keymask & ~x != self.keymask:
             self.keymask &= ~x
             self._update_linkmap_buttons()
+        # Ugly workaround for bgo#584342
+        elif event.keyval == gtk.keysyms.ISO_Prev_Group:
+            self.keymask = 0
+            self._update_linkmap_buttons()
 
     def _get_pane_label(self, i):
         #TRANSLATORS: this is the name of a new file which has not yet been saved



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