Commit c7e1f567 authored by Allison Karlitskaya's avatar Allison Karlitskaya

GtkButton: avoid use of gtk_get_event_widget()

We can compare the window to the window instead of the widget to the
widget.
parent 56d2590b
......@@ -1725,12 +1725,10 @@ gtk_button_enter_notify (GtkWidget *widget,
GdkEventCrossing *event)
{
GtkButton *button;
GtkWidget *event_widget;
button = GTK_BUTTON (widget);
event_widget = gtk_get_event_widget ((GdkEvent*) event);
if ((event_widget == widget) &&
if ((event->window == button->event_window) &&
(event->detail != GDK_NOTIFY_INFERIOR))
{
button->in_button = TRUE;
......@@ -1745,14 +1743,12 @@ gtk_button_leave_notify (GtkWidget *widget,
GdkEventCrossing *event)
{
GtkButton *button;
GtkWidget *event_widget;
button = GTK_BUTTON (widget);
event_widget = gtk_get_event_widget ((GdkEvent*) event);
if ((event_widget == widget) &&
if ((event->window == button->event_window) &&
(event->detail != GDK_NOTIFY_INFERIOR) &&
(gtk_widget_get_sensitive (event_widget)))
(gtk_widget_get_sensitive (widget)))
{
button->in_button = FALSE;
gtk_button_leave (button);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment