summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-12-18 14:25:46 +0300
committerMonsta <[email protected]>2015-12-18 14:34:46 +0300
commit38b4b98ce3993a1dadb4f84d9f981ed9c4e5340a (patch)
treea9d77520e0f1fc43988e96d9a62a9ea4abfd9741
parent3d3d84530f6e7e581eadd2ef11e97dd325879b11 (diff)
downloadmate-panel-38b4b98ce3993a1dadb4f84d9f981ed9c4e5340a.tar.bz2
mate-panel-38b4b98ce3993a1dadb4f84d9f981ed9c4e5340a.tar.xz
button-widget: properly init a variable in GTK+3 build
-rw-r--r--mate-panel/button-widget.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mate-panel/button-widget.c b/mate-panel/button-widget.c
index c59cd1ae..78c5db11 100644
--- a/mate-panel/button-widget.c
+++ b/mate-panel/button-widget.c
@@ -771,12 +771,14 @@ button_widget_enter_notify (GtkWidget *widget, GdkEventCrossing *event)
g_return_val_if_fail (BUTTON_IS_WIDGET (widget), FALSE);
#if GTK_CHECK_VERSION (3, 0, 0)
- GtkStateFlags state_flags;
+ GtkStateFlags state_flags = gtk_widget_get_state_flags (widget);
in_button = state_flags & GTK_STATE_FLAG_PRELIGHT;
#else
in_button = GTK_BUTTON (widget)->in_button;
#endif
+
GTK_WIDGET_CLASS (button_widget_parent_class)->enter_notify_event (widget, event);
+
#if GTK_CHECK_VERSION (3, 0, 0)
state_flags = gtk_widget_get_state_flags (widget);
if (in_button != (state_flags & GTK_STATE_FLAG_PRELIGHT) &&
@@ -797,12 +799,14 @@ button_widget_leave_notify (GtkWidget *widget, GdkEventCrossing *event)
g_return_val_if_fail (BUTTON_IS_WIDGET (widget), FALSE);
#if GTK_CHECK_VERSION (3, 0, 0)
- GtkStateFlags state_flags;
+ GtkStateFlags state_flags = gtk_widget_get_state_flags (widget);
in_button = state_flags & GTK_STATE_FLAG_PRELIGHT;
#else
in_button = GTK_BUTTON (widget)->in_button;
#endif
+
GTK_WIDGET_CLASS (button_widget_parent_class)->leave_notify_event (widget, event);
+
#if GTK_CHECK_VERSION (3, 0, 0)
state_flags = gtk_widget_get_state_flags (widget);
if (in_button != (state_flags & GTK_STATE_FLAG_PRELIGHT) &&