minor GtkButton fix



Currently GtkButton only animates when activated if the cursor is in
it.  This is clearly broken for keyboard activation.  Here is a small
patch to fix it.  It seems really obvious, and seems to work.  However,
I haven't thought it all the way through, so if anyone who also knows
the code could look at it before I commit, I'd appreciate it.

Thanks,
-Jonathan


cvs server: Diffing .
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.2240
diff -u -r1.2240 ChangeLog
--- ChangeLog   2001/09/03 01:43:51     1.2240
+++ ChangeLog   2001/09/03 05:35:20
@@ -1,3 +1,8 @@
+Sun Sep  2 17:24:27 2001  Jonathan Blandford  <jrb webwynk net>
+
+       * gtk/gtkbutton.c (gtk_button_update_state): Get depressed
+       correctly.
+
 Sun Sep  2 21:41:21 2001  Owen Taylor  <otaylor redhat com>
 
        * gdk/x11/gdkkeys-x11.c (update_keymaps): Set current serial

cvs server: Diffing gtk
Index: gtk/gtkbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkbutton.c,v
retrieving revision 1.67
diff -u -r1.67 gtkbutton.c
--- gtk/gtkbutton.c     2001/08/27 01:05:07     1.67
+++ gtk/gtkbutton.c     2001/09/03 05:35:21
@@ -1224,7 +1224,7 @@
   gboolean depressed;
   GtkStateType new_state;
 
-  depressed = button->in_button && button->button_down;
+  depressed = button->button_down;
       
   if (!button->button_down && button->in_button)
     new_state = GTK_STATE_PRELIGHT;




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