summaryrefslogtreecommitdiff
path: root/gtk/gtkprivate.h
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2010-10-09 22:15:34 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2010-10-11 14:05:29 -0400
commit88cf5470290cd03ada031641cb6ee1c90df75e7d (patch)
tree51bfd875230a661321ef64cb925a36a24d616020 /gtk/gtkprivate.h
parentc250a7e6732802a8918db207f3f7cb296f69f3fc (diff)
downloadgtk+-88cf5470290cd03ada031641cb6ee1c90df75e7d.tar.gz
Fix handling of the geometry widget
The geometry widget feature of gtk_window_set_geometry_hints() has never really worked right because the calculation that GTK+ did to compute the base size of the window only worked when the geometry widget had a larger minimum size than anything else in the window. Setup: * Move the GtkSizeGroup private functions to a new private header gtksizegroup-private.h * Add the possibilty to pass flags to _gtk_size_group_queue_resize(), with the flag GTK_QUEUE_RESIZE_INVALIDATE_ONLY to suppress adding the widget's toplevel to the resize queue. * _gtk_container_resize_invalidate() is added to implement that feature * _gtk_widget_override_size_request()/_gtk_widget_restore_size_request() allow temporarily forcing a large minimum size on the geometry widget without creating resize loops. GtkWindow: * Compute the extra width/height around the geometry widget correctly; print a warning if the computation fails. * Always make the minimum size at least the natural minimum size of the toplevel; GTK+ now fails badly with underallocation. * Always set the base size hint; we were failing to set it properly when the specified minimum size was overriden, but it's harmless to always set it. Tests: * New test 'testgeometry' that replaces the 'gridded geometry' test from testgtk. The new test is roughly similar but creates a bunch of windows showing different possibilities. * The testgtk test is removed. No need to have both. https://bugzilla.gnome.org/show_bug.cgi?id=68668
Diffstat (limited to 'gtk/gtkprivate.h')
-rw-r--r--gtk/gtkprivate.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index c0f14b4f32..d8fd0c021b 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -55,6 +55,15 @@ gboolean _gtk_widget_get_height_request_needed (GtkWidget *widget);
void _gtk_widget_set_height_request_needed (GtkWidget *widget,
gboolean height_request_needed);
+void _gtk_widget_override_size_request (GtkWidget *widget,
+ int width,
+ int height,
+ int *old_width,
+ int *old_height);
+void _gtk_widget_restore_size_request (GtkWidget *widget,
+ int old_width,
+ int old_height);
+
#ifdef G_OS_WIN32
const gchar *_gtk_get_datadir ();