Fixup some problems with text length handling in error cases.

Sat Jun 23 10:27:53 2001  Owen Taylor  <otaylor@redhat.com>

	* modules/input/gtkimcontextxim.c: Fixup some problems with
	text length handling in error cases.

	* gtk/gtkwidget.c (gtk_widget_size_allocate): Reorder
	a bit to make test actually warn on attempt to allocation
	a negative size. (#56101, Matthias Clasen)
This commit is contained in:
Owen Taylor
2001-06-23 14:32:44 +00:00
committed by Owen Taylor
parent 7ab5f8c5a7
commit b09d194d3c
9 changed files with 70 additions and 6 deletions

View File

@ -2275,18 +2275,16 @@ gtk_widget_size_allocate (GtkWidget *widget,
real_allocation.y = aux_info->y;
}
real_allocation.width = MAX (real_allocation.width, 1);
real_allocation.height = MAX (real_allocation.height, 1);
if (real_allocation.width < 0 || real_allocation.height < 0)
{
g_warning ("gtk_widget_size_allocate(): attempt to allocate widget with width %d and height %d",
real_allocation.width,
real_allocation.height);
real_allocation.width = 1;
real_allocation.height = 1;
}
real_allocation.width = MAX (real_allocation.width, 1);
real_allocation.height = MAX (real_allocation.height, 1);
if (GTK_WIDGET_NO_WINDOW (widget))
{
if (widget->allocation.x != real_allocation.x ||