[gtk+/gtk-style-context: 239/276] 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/276] GtkButton: Notify on prelight state change.
- Date: Sat, 23 Oct 2010 19:15:13 +0000 (UTC)
commit bbea00f994ea3e774ff1726a382e46c6653f5b60
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 a395282..fc20050 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -1733,6 +1733,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;
@@ -1752,6 +1764,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]