summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@redhat.com>2008-06-24 14:21:52 -0400
committerSøren Sandmann Pedersen <sandmann@redhat.com>2008-06-24 14:21:52 -0400
commit33c07eaea19ffced5edb6de35cb2497b76d3370d (patch)
treebd97e00f0966340bc0918250c83bd34e67f4b13b
parentd41b015061d2119b17af4323cabacf67fc36d070 (diff)
Better positioning when loading into an empty window
-rw-r--r--window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/window.c b/window.c
index 60f1b0d..2524966 100644
--- a/window.c
+++ b/window.c
@@ -923,8 +923,12 @@ set_defaults (SivWindow *window)
if (height > monitor.height)
height = monitor.height - 32;
+
+ if (GTK_WIDGET_REALIZED (get_widget (window, "main_window")))
+ gtk_window_resize (get_widget (window, "main_window"), width, height);
+ else
+ gtk_window_set_default_size (get_widget (window, "main_window"), width, height);
- gtk_window_set_default_size (get_widget (window, "main_window"), width, height);
gtk_window_move (get_widget (window, "main_window"),
(monitor.width - width) / 2,
(monitor.height - height) / 2);