From 82efaa626fd89111aabe31a7ab1655301c11f61a Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Sat, 8 Jul 2006 17:37:41 +0000 Subject: [PATCH] Improve switching out of fullscreen after startup git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@542 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 2 ++ src/keyfile.c | 11 ++++++++++- src/main.c | 7 ------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index f82381af..d4db8871 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2006-07-08 Nick Treleaven * src/keyfile.c: Fix saving the terminal tool on quitting. + * src/keyfile.c, src/main.c: + Improve switching out of fullscreen after startup. 2006-07-08 Enrico Tröger diff --git a/src/keyfile.c b/src/keyfile.c index 9ce39dd2..8bf57c22 100644 --- a/src/keyfile.c +++ b/src/keyfile.c @@ -114,7 +114,7 @@ void configuration_save(void) g_key_file_set_string(config, PACKAGE, "tagbar_font", app->tagbar_font); g_key_file_set_string(config, PACKAGE, "msgwin_font", app->msgwin_font); g_key_file_set_string(config, PACKAGE, "scribble_text", scribble_text); - if (app->pref_main_save_winpos) + if (app->pref_main_save_winpos && ! app->fullscreen) { gtk_window_get_position(GTK_WINDOW(app->window), &app->geometry[0], &app->geometry[1]); gtk_window_get_size(GTK_WINDOW(app->window), &app->geometry[2], &app->geometry[3]); @@ -455,6 +455,15 @@ void configuration_apply_settings(void) tabnum++; } } + + // set fullscreen after initial draw so that returning to normal view is the right size. + // fullscreen mode is disabled by default, so act only if it is true + if (app->fullscreen) + { + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_fullscreen1")), TRUE); + app->fullscreen = TRUE; + utils_set_fullscreen(); + } } diff --git a/src/main.c b/src/main.c index 4ca2adf9..af72e7b1 100644 --- a/src/main.c +++ b/src/main.c @@ -157,13 +157,6 @@ static void apply_settings(void) } utils_update_toolbar_icons(app->toolbar_icon_size); - // fullscreen mode is disabled by default, so act only if it is true - if (app->fullscreen) - { - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_fullscreen1")), TRUE); - app->fullscreen = TRUE; - utils_set_fullscreen(); - } // line number and markers margin are by default enabled if (! app->show_markers_margin) {