[gtk+/wip/carlosg/event-delivery-cleanups: 20/30] gtkbutton: Remove enter/leave event handlers
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery-cleanups: 20/30] gtkbutton: Remove enter/leave event handlers
- Date: Fri, 15 Sep 2017 19:11:34 +0000 (UTC)
commit 965334dcc6091486f412dcdc8b2a286ed0d0f60e
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Sep 15 16:28:37 2017 +0200
gtkbutton: Remove enter/leave event handlers
They just maintain priv->in_button and widget state up-to-date, this
basically matters during user interaction, and is already maintained
in the gesture ::update handler. This seems to be sufficient.
gtk/gtkbutton.c | 32 --------------------------------
1 files changed, 0 insertions(+), 32 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 592fa10..e56d940 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -122,10 +122,6 @@ static void gtk_button_unrealize (GtkWidget * widget);
static gint gtk_button_grab_broken (GtkWidget * widget,
GdkEventGrabBroken * event);
static gint gtk_button_key_release (GtkWidget * widget, GdkEventKey * event);
-static gint gtk_button_enter_notify (GtkWidget * widget,
- GdkEventCrossing * event);
-static gint gtk_button_leave_notify (GtkWidget * widget,
- GdkEventCrossing * event);
static void gtk_real_button_clicked (GtkButton * button);
static void gtk_real_button_activate (GtkButton *button);
static void gtk_button_update_state (GtkButton *button);
@@ -208,8 +204,6 @@ gtk_button_class_init (GtkButtonClass *klass)
widget_class->unrealize = gtk_button_unrealize;
widget_class->grab_broken_event = gtk_button_grab_broken;
widget_class->key_release_event = gtk_button_key_release;
- widget_class->enter_notify_event = gtk_button_enter_notify;
- widget_class->leave_notify_event = gtk_button_leave_notify;
widget_class->state_flags_changed = gtk_button_state_flags_changed;
widget_class->grab_notify = gtk_button_grab_notify;
widget_class->unmap = gtk_button_unmap;
@@ -798,32 +792,6 @@ gtk_button_key_release (GtkWidget *widget,
return FALSE;
}
-static gboolean
-gtk_button_enter_notify (GtkWidget *widget,
- GdkEventCrossing *event)
-{
- GtkButton *button = GTK_BUTTON (widget);
- GtkButtonPrivate *priv = button->priv;
-
- priv->in_button = TRUE;
- gtk_button_update_state (button);
-
- return FALSE;
-}
-
-static gboolean
-gtk_button_leave_notify (GtkWidget *widget,
- GdkEventCrossing *event)
-{
- GtkButton *button = GTK_BUTTON (widget);
- GtkButtonPrivate *priv = button->priv;
-
- priv->in_button = FALSE;
- gtk_button_update_state (button);
-
- return FALSE;
-}
-
static void
gtk_real_button_clicked (GtkButton *button)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]