diff options
author | Søren Sandmann Pedersen <sandmann@redhat.com> | 2008-06-24 14:21:52 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@redhat.com> | 2008-06-24 14:21:52 -0400 |
commit | 33c07eaea19ffced5edb6de35cb2497b76d3370d (patch) | |
tree | bd97e00f0966340bc0918250c83bd34e67f4b13b | |
parent | d41b015061d2119b17af4323cabacf67fc36d070 (diff) |
Better positioning when loading into an empty window
-rw-r--r-- | window.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); |