Improved main loop test. (Quits main loop properly, makes it more obvious

Mon Mar 30 16:35:57 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/testgtk.c: Improved main loop test. (Quits main
	loop properly, makes it more obvious to the user
	what is going on)

	* gtk/gtkwidget.c (gtk_widget_unparent): Reset the
	allocation _after_ clearing the window.

	* configure.in: If can't find XShmAttach in Xext, check
	in XextSam (for AIX).

	* gtk/gtkmain.c (gtk_events_pending): Remember, small
	numbers are _high_ priority for idle queues.

	* gtk/gtkmain.c (gtk_handle_current_timeouts): Allow
	removing the currently running timeout.

	* gtk/testgtk.c (timeout_test): Use the right prototype
	for callback.
This commit is contained in:
Owen Taylor
1998-03-30 23:04:51 +00:00
committed by Owen Taylor
parent 8eb7761e72
commit 4bf5d761bc
12 changed files with 280 additions and 42 deletions

View File

@ -1156,14 +1156,6 @@ gtk_widget_unparent (GtkWidget *widget)
GTK_PRIVATE_UNSET_FLAG (widget, GTK_RESIZE_NEEDED);
}
/* Reset the width and height here, to force reallocation if we
* get added back to a new parent. This won't work if our new
* allocation is smaller than 1x1 and we actually want a size of 1x1...
* (would 0x0 be OK here?)
*/
widget->allocation.width = 1;
widget->allocation.height = 1;
if (widget->window &&
GTK_WIDGET_NO_WINDOW (widget) &&
GTK_WIDGET_DRAWABLE (widget))
@ -1173,6 +1165,14 @@ gtk_widget_unparent (GtkWidget *widget)
widget->allocation.width,
widget->allocation.height);
/* Reset the width and height here, to force reallocation if we
* get added back to a new parent. This won't work if our new
* allocation is smaller than 1x1 and we actually want a size of 1x1...
* (would 0x0 be OK here?)
*/
widget->allocation.width = 1;
widget->allocation.height = 1;
if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_IN_REPARENT (widget))
gtk_widget_unrealize (widget);