diff options
author | Owen Taylor <otaylor@redhat.com> | 1998-12-22 20:06:44 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-12-22 20:06:44 +0000 |
commit | 7f0156c2eacc68490e7b32c4ee6f0a987542ad0d (patch) | |
tree | 5c263c2c80f9b2b2b38f182085f63ca371ec3eef /gtk/gtkdnd.c | |
parent | b45236cee87a9d98e54a66658aadd49644d5a250 (diff) | |
download | gtk+-7f0156c2eacc68490e7b32c4ee6f0a987542ad0d.tar.gz |
Optimization - when we've already found a widget, skip all checks for
Tue Dec 22 14:50:25 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_find_widget): Optimization -
when we've already found a widget, skip all checks
for subsequent children.
* gtk/gtkdnd.c (gtk_drag_find_widget): Checked for
!MAPPED, not !VISIBLE, since a widget (like a notebook
page), can be VISIBLE, but !REALIZED or !MAPPED.
* gtk/gtkdnd.c (gtk_drag_find_widget): Use forall(),
not foreach().
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r-- | gtk/gtkdnd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 8c9a55c1dc..68379c9583 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -1054,7 +1054,7 @@ gtk_drag_find_widget (GtkWidget *widget, new_allocation = widget->allocation; - if (!GTK_WIDGET_VISIBLE (widget)) + if (data->found || !GTK_WIDGET_MAPPED (widget)) return; if (!GTK_WIDGET_NO_WINDOW (widget)) @@ -1113,9 +1113,9 @@ gtk_drag_find_widget (GtkWidget *widget, new_data.found = FALSE; new_data.toplevel = FALSE; - gtk_container_foreach (GTK_CONTAINER (widget), - (GtkCallback)gtk_drag_find_widget, - &new_data); + gtk_container_forall (GTK_CONTAINER (widget), + (GtkCallback)gtk_drag_find_widget, + &new_data); data->found = new_data.found; } |