Mercurial > dwindows
diff gtk/dw.c @ 1471:26dbd11399d6
Don't attempt to set windows to an invalid size on GTK when
a very small or 0 size is requested.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 20 Dec 2011 15:05:14 +0000 |
parents | a317c2ec1d4c |
children | 1794caee0758 |
line wrap: on
line diff
--- a/gtk/dw.c Tue Dec 20 14:30:10 2011 +0000 +++ b/gtk/dw.c Tue Dec 20 15:05:14 2011 +0000 @@ -10251,8 +10251,11 @@ gtk_object_set_data(GTK_OBJECT(handle), "_dw_height", GINT_TO_POINTER(height)); } /* Resize minus the border size */ - gdk_window_resize(handle->window, width - cx , height - cy ); - gtk_window_set_default_size(GTK_WINDOW(handle), width - cx, height - cy ); + if(width > cx && height > cy) + { + gdk_window_resize(handle->window, width - cx , height - cy ); + gtk_window_set_default_size(GTK_WINDOW(handle), width - cx, height - cy ); + } } else gtk_widget_set_usize(handle, width, height);