From 650fd1fd27572616699934f01d3cea8b90e94f12 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 24 Dec 2006 06:06:37 +0000 Subject: [PATCH] Be more careful when faking a button release. (#323146, Travis Abbott) 2006-12-24 Matthias Clasen * gtk/gtkbutton.c (gtk_button_grab_notify): Be more careful when faking a button release. (#323146, Travis Abbott) --- ChangeLog | 4 ++++ gtk/gtkbutton.c | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 426722957f..28c61f9d09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-12-24 Matthias Clasen + * gtk/gtkbutton.c (gtk_button_grab_notify): Be more + careful when faking a button release. (#323146, + Travis Abbott) + * gtk/gtkhandlebox.c (draw_textured_frame): Draw the handle with the right orientation, depending on the position of the handlebox. (#159764, Benjamin Berg) diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 471d73887d..002241ce10 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -1932,11 +1932,18 @@ gtk_button_grab_notify (GtkWidget *widget, gboolean was_grabbed) { GtkButton *button = GTK_BUTTON (widget); + gboolean save_in; if (!was_grabbed) { - button->in_button = FALSE; + save_in = button->in_button; + button->in_button = FALSE; gtk_real_button_released (button); + if (save_in != button->in_button) + { + button->in_button = save_in; + gtk_button_update_state (button); + } } }