[goobox] correctly restore the window size



commit 9ce3687ae391db36f0fd1158d32c325a5f809e7e
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Dec 28 18:10:19 2018 +0100

    correctly restore the window size

 src/goo-window.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/goo-window.c b/src/goo-window.c
index 7fbde8b..3f5548a 100644
--- a/src/goo-window.c
+++ b/src/goo-window.c
@@ -872,11 +872,11 @@ pref_playlist_shuffle_changed (GSettings  *settings,
 static void
 save_window_size (GooWindow *window)
 {
-       GdkWindow *w;
+       int width, height;
 
-       w = gtk_widget_get_window (GTK_WIDGET (window));
-       g_settings_set_int (window->priv->settings_ui, PREF_UI_WINDOW_WIDTH, gdk_window_get_width (w));
-       g_settings_set_int (window->priv->settings_ui, PREF_UI_WINDOW_HEIGHT, gdk_window_get_height (w));
+       gtk_window_get_size (GTK_WINDOW (window), &width, &height);
+       g_settings_set_int (window->priv->settings_ui, PREF_UI_WINDOW_WIDTH, width);
+       g_settings_set_int (window->priv->settings_ui, PREF_UI_WINDOW_HEIGHT, height);
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]