[gtk+/gtk-3-8] Don't activate GtkExpander if mouse dragged away



commit 5b2e44fd44033cc88c3a77fe1f184f1dad913a7f
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Aug 21 22:03:02 2013 -0700

    Don't activate GtkExpander if mouse dragged away
    
    Previously, when you clicked and held the button down on a
    GtkExpander's label or disclosure triangle, then moved the mouse
    away and released the button, the expander would still activate.
    This brings the behavior in line with the more generally expected
    behavior, as exhibited by GtkButton for example.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706345

 gtk/gtkexpander.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 6f6a196..088f3d6 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -1043,7 +1043,8 @@ gtk_expander_button_release (GtkWidget      *widget,
 
   if (event->button == GDK_BUTTON_PRIMARY && expander->priv->button_down)
     {
-      gtk_widget_activate (widget);
+      if (expander->priv->prelight)
+        gtk_widget_activate (widget);
       expander->priv->button_down = FALSE;
       return TRUE;
     }


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