summaryrefslogtreecommitdiff
path: root/gtk/gtkwindow.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1999-02-24 16:29:47 +0000
committerTim Janik <timj@src.gnome.org>1999-02-24 16:29:47 +0000
commitc4fe78345e11dfd2ed909500cdc6000682d96304 (patch)
treea9db551c00b2a2ef3169ae3a6f532a6217e80955 /gtk/gtkwindow.c
parent082c0c8975001303cd3a50f2160766c77fc7710b (diff)
downloadgtk+-c4fe78345e11dfd2ed909500cdc6000682d96304.tar.gz
warn about &widget->requisition, even for toplevels.
Wed Feb 24 11:19:12 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_size_request): warn about &widget->requisition, even for toplevels. * gtk/gtkwindow.c (gtk_window_move_resize): request size into an automatic variable and check if our size has changed. when we decide to reallocate everything, we need to resize our own GdkWindow as well. * gtk/gtkmain.c: * gtk/gtkobject.c: hack time, make --gtk-debug=objects work even after gtk_type_init(), this is to "fix" gnome's arg parsing oddities. * gtk/gtktypeutils.h: don't segfault in GTK_CHECK_CLASS_TYPE and GTK_CHECK_TYPE upon NULL pointers. * gtk/gtklayout.c: removed bogus prototypes of gtk_layout_gravity_works, gtk_layout_set_static_gravity, gtk_layout_add_child_cb and gtk_layout_remove_child_cb to shut up compiler. * gtk/Makefile.am: added an empty rule gtkrc: : so make doesn't try to "update" gtkrc from gtkrc.c.
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r--gtk/gtkwindow.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 20e2c98001..04ce74819a 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1295,6 +1295,7 @@ gtk_window_move_resize (GtkWindow *window)
{
GtkWidget *widget;
GtkWindowGeometryInfo *info;
+ GtkRequisition requisition;
GtkContainer *container;
gint x, y;
gint width, height;
@@ -1324,33 +1325,37 @@ gtk_window_move_resize (GtkWindow *window)
else
height = widget->requisition.height;
- gtk_widget_size_request (widget, &widget->requisition);
+ size_changed = FALSE;
- /* Figure out the new desired size */
+ gtk_widget_size_request (widget, &requisition);
- size_changed = FALSE;
+ size_changed |= requisition.width != widget->requisition.width;
+ size_changed |= requisition.height != widget->requisition.height;
+ widget->requisition = requisition;
+
+ /* Figure out the new desired size */
if (info && info->width > 0)
{
- size_changed = size_changed || (width != info->last_width);
+ size_changed |= width != info->last_width;
info->last_width = width;
new_width = info->width;
}
else
{
- size_changed = size_changed || (width != widget->requisition.width);
+ size_changed |= width != widget->requisition.width;
new_width = widget->requisition.width;
}
if (info && info->height > 0)
{
- size_changed = size_changed || (height != info->last_height);
+ size_changed |= height != info->last_height;
info->last_height = height;
new_height = info->height;
}
else
{
- size_changed = size_changed || (height != widget->requisition.height);
+ size_changed |= height != widget->requisition.height;
new_height = widget->requisition.height;
}
@@ -1493,6 +1498,9 @@ gtk_window_move_resize (GtkWindow *window)
allocation.height = new_height;
gtk_widget_size_allocate (widget, &allocation);
+ gdk_window_resize (widget->window,
+ new_width,
+ new_height);
}
else
{