[gtk+/gtk-style-context: 239/260] GtkButton: Notify on prelight state change.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 239/260] GtkButton: Notify on prelight state change.
- Date: Wed, 20 Oct 2010 10:41:31 +0000 (UTC)
commit c7a95e9ff8db9c41575a1e3c8e45886d9ffddd1a
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 5 10:56:52 2010 +0200
GtkButton: Notify on prelight state change.
gtk/gtkbutton.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 2f4da36..23df056 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -1735,6 +1735,18 @@ gtk_button_enter_notify (GtkWidget *widget,
{
button->in_button = TRUE;
gtk_button_enter (button);
+
+ if (gtk_widget_get_realized (widget) &&
+ gtk_widget_is_drawable (widget))
+ {
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_notify_state_change (context,
+ gtk_widget_get_window (widget),
+ NULL, GTK_STATE_PRELIGHT,
+ button->in_button);
+ }
}
return FALSE;
@@ -1756,6 +1768,18 @@ gtk_button_leave_notify (GtkWidget *widget,
{
button->in_button = FALSE;
gtk_button_leave (button);
+
+ if (gtk_widget_get_realized (widget) &&
+ gtk_widget_is_drawable (widget))
+ {
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_notify_state_change (context,
+ gtk_widget_get_window (widget),
+ NULL, GTK_STATE_PRELIGHT,
+ button->in_button);
+ }
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]