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().
This commit is contained in:
Owen Taylor 1998-12-22 20:06:44 +00:00 committed by Owen Taylor
parent b45236cee8
commit 7f0156c2ea
8 changed files with 95 additions and 4 deletions

View File

@ -1,3 +1,16 @@
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().
Mon Dec 21 22:01:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_motion): fixed column resize bug

View File

@ -1,3 +1,16 @@
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().
Mon Dec 21 22:01:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_motion): fixed column resize bug

View File

@ -1,3 +1,16 @@
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().
Mon Dec 21 22:01:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_motion): fixed column resize bug

View File

@ -1,3 +1,16 @@
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().
Mon Dec 21 22:01:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_motion): fixed column resize bug

View File

@ -1,3 +1,16 @@
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().
Mon Dec 21 22:01:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_motion): fixed column resize bug

View File

@ -1,3 +1,16 @@
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().
Mon Dec 21 22:01:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_motion): fixed column resize bug

View File

@ -1,3 +1,16 @@
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().
Mon Dec 21 22:01:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_motion): fixed column resize bug

View File

@ -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;
}