X-Git-Url: https://git.wpitchoune.net/gitweb/?p=prss.git;a=blobdiff_plain;f=src%2Fmain.c;h=e7d17d03b07250e5fa7806f27a5ec21b2a923bc5;hp=b20297be7f3196961c6ed0281ef474652908e91a;hb=7d3ae1cda431c06636a7238b05b286b5ec6d41f5;hpb=20eb458789ff0b7e210e4031b03705ebbba00585 diff --git a/src/main.c b/src/main.c index b20297b..e7d17d0 100644 --- a/src/main.c +++ b/src/main.c @@ -451,12 +451,14 @@ static void save_settings() gtk_window_get_size(window, &w, &h); gtk_window_get_position(window, &x, &y); - log_debug("save_settings(): x=%d, y=%d", x, y); + log_debug("save_settings(): x=%d, y=%d, w=%d, h=%d", x, y, w, h); g_settings_set_int(settings, "window-x", x); g_settings_set_int(settings, "window-y", y); g_settings_set_int(settings, "window-width", w); g_settings_set_int(settings, "window-height", h); + + g_settings_sync(); } gboolean @@ -579,9 +581,10 @@ int main(int argc, char **argv) NULL); window = GTK_WINDOW(gtk_builder_get_object(builder, "window")); - gtk_window_set_default_size(window, - g_settings_get_int(settings, "window-width"), - g_settings_get_int(settings, "window-height")); + gtk_window_set_default_size + (window, + g_settings_get_int(settings, "window-width"), + g_settings_get_int(settings, "window-height")); gtk_window_move(window, g_settings_get_int(settings, "window-x"), g_settings_get_int(settings, "window-y"));