diff --git a/ChangeLog b/ChangeLog index 668256c7c1..8903190434 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Feb 27 18:50:29 2002 Owen Taylor + + * 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 * gtk/stock-icons/Makefile.am: Split big VARIABLES variable diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 668256c7c1..8903190434 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Wed Feb 27 18:50:29 2002 Owen Taylor + + * 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 * gtk/stock-icons/Makefile.am: Split big VARIABLES variable diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 668256c7c1..8903190434 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Wed Feb 27 18:50:29 2002 Owen Taylor + + * 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 * gtk/stock-icons/Makefile.am: Split big VARIABLES variable diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 668256c7c1..8903190434 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Wed Feb 27 18:50:29 2002 Owen Taylor + + * 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 * gtk/stock-icons/Makefile.am: Split big VARIABLES variable diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 668256c7c1..8903190434 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Wed Feb 27 18:50:29 2002 Owen Taylor + + * 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 * gtk/stock-icons/Makefile.am: Split big VARIABLES variable diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 668256c7c1..8903190434 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Wed Feb 27 18:50:29 2002 Owen Taylor + + * 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 * gtk/stock-icons/Makefile.am: Split big VARIABLES variable diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 668256c7c1..8903190434 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Wed Feb 27 18:50:29 2002 Owen Taylor + + * 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 * gtk/stock-icons/Makefile.am: Split big VARIABLES variable diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 00d62d34da..57c5d38b44 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -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;