summaryrefslogtreecommitdiff
path: root/gtk/gtktogglebutton.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtktogglebutton.c')
-rw-r--r--gtk/gtktogglebutton.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 96856c26ff..ef5ece56df 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -136,6 +136,7 @@ static void gtk_toggle_button_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gtk_toggle_button_update_state (GtkButton *button);
+static void gtk_toggle_button_enter_leave (GtkButton *button);
static void gtk_toggle_button_activatable_interface_init (GtkActivatableIface *iface);
@@ -174,8 +175,8 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
button_class->pressed = gtk_toggle_button_pressed;
button_class->released = gtk_toggle_button_released;
button_class->clicked = gtk_toggle_button_clicked;
- button_class->enter = gtk_toggle_button_update_state;
- button_class->leave = gtk_toggle_button_update_state;
+ button_class->enter = gtk_toggle_button_enter_leave;
+ button_class->leave = gtk_toggle_button_enter_leave;
class->toggled = NULL;
@@ -639,6 +640,13 @@ gtk_toggle_button_clicked (GtkButton *button)
}
static void
+gtk_toggle_button_enter_leave (GtkButton *button)
+{
+ gtk_toggle_button_update_state (button);
+ gtk_widget_queue_draw (GTK_WIDGET (button));
+}
+
+static void
gtk_toggle_button_update_state (GtkButton *button)
{
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);