[gtk+] GtkLabel: don't eat too many button release events



commit 62254456f7a4b2401e15c5383e0a06cacec2e069
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 17 23:09:44 2014 -0500

    GtkLabel: don't eat too many button release events
    
    We should only eat button release events when the label is
    actually selectable, since the comment indicates that we
    want to eat the release events belonging to press events
    that triggered a selection. This fixes problems with actions
    on parent widgets that are triggered by button release,
    as seen in this bug:
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724541

 gtk/gtklabel.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 27e202e..fbb0d87 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -4801,7 +4801,10 @@ gtk_label_button_release (GtkWidget      *widget,
   /* The goal here is to return TRUE iff we ate the
    * button press to start selecting.
    */
-  return TRUE;
+  if (info->selectable)
+    return TRUE;
+
+  return FALSE;
 }
 
 static void


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