Allow focus-change events to be sent to unrealized widgets; they aren't

Wed Feb 27 18:50:29 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
        events to be sent to unrealized widgets; they aren't
        really normal events in that they have anything to
        do with widget->window. (#72914)
This commit is contained in:
Owen Taylor 2002-02-27 23:53:29 +00:00 committed by Owen Taylor
parent 8ba3ebdef8
commit 531861fb8f
8 changed files with 55 additions and 3 deletions

View File

@ -1,3 +1,10 @@
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to
do with widget->window. (#72914)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am: Split big VARIABLES variable

View File

@ -1,3 +1,10 @@
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to
do with widget->window. (#72914)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am: Split big VARIABLES variable

View File

@ -1,3 +1,10 @@
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to
do with widget->window. (#72914)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am: Split big VARIABLES variable

View File

@ -1,3 +1,10 @@
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to
do with widget->window. (#72914)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am: Split big VARIABLES variable

View File

@ -1,3 +1,10 @@
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to
do with widget->window. (#72914)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am: Split big VARIABLES variable

View File

@ -1,3 +1,10 @@
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to
do with widget->window. (#72914)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am: Split big VARIABLES variable

View File

@ -1,3 +1,10 @@
Wed Feb 27 18:50:29 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_event): Allow focus-change
events to be sent to unrealized widgets; they aren't
really normal events in that they have anything to
do with widget->window. (#72914)
Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am: Split big VARIABLES variable

View File

@ -2896,6 +2896,9 @@ gtk_widget_real_focus_out_event (GtkWidget *widget,
return FALSE;
}
#define WIDGET_REALIZED_FOR_EVENT(widget, event) \
(event->type == GDK_FOCUS_CHANGE || GTK_WIDGET_REALIZED(widget))
/**
* gtk_widget_event:
* @widget: a #GtkWidget
@ -2917,7 +2920,7 @@ gtk_widget_event (GtkWidget *widget,
GdkEvent *event)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), TRUE);
g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), TRUE);
g_return_val_if_fail (WIDGET_REALIZED_FOR_EVENT (widget, event), TRUE);
if (event->type == GDK_EXPOSE)
{
@ -2973,7 +2976,7 @@ gtk_widget_event_internal (GtkWidget *widget,
gtk_widget_ref (widget);
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[EVENT], event, &return_val);
return_val |= !GTK_WIDGET_REALIZED (widget);
return_val |= !WIDGET_REALIZED_FOR_EVENT (widget, event);
if (!return_val)
{
gint signal_num;
@ -3068,7 +3071,7 @@ gtk_widget_event_internal (GtkWidget *widget,
if (signal_num != -1)
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[signal_num], event, &return_val);
}
if (GTK_WIDGET_REALIZED (widget))
if (WIDGET_REALIZED_FOR_EVENT (widget, event))
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[EVENT_AFTER], event);
else
return_val = TRUE;