Index: thunar/thunar-preferences.c =================================================================== --- thunar/thunar-preferences.c (revision 28993) +++ thunar/thunar-preferences.c (working copy) @@ -68,6 +68,7 @@ PROP_LAST_VIEW, PROP_LAST_WINDOW_HEIGHT, PROP_LAST_WINDOW_WIDTH, + PROP_LAST_WINDOW_FULLSCREEN, PROP_MISC_VOLUME_MANAGEMENT, PROP_MISC_CASE_SENSITIVE, PROP_MISC_DATE_STYLE, @@ -436,6 +437,20 @@ "last-window-width", 1, G_MAXINT, 640, EXO_PARAM_READWRITE)); + + /** + * ThunarPreferences:last-window-maximized: + * + * The last known maximized state of a #ThunarWindow, which will be used as + * default width for newly created windows. + **/ + g_object_class_install_property (gobject_class, + PROP_LAST_WINDOW_FULLSCREEN, + g_param_spec_boolean ("last-window-maximized", + "LastWindowMaximized", + "last-window-maximized", + FALSE, + EXO_PARAM_READWRITE)); /** * ThunarPreferences:misc-volume-management: Index: thunar/thunar-window.c =================================================================== --- thunar/thunar-window.c (revision 28993) +++ thunar/thunar-window.c (working copy) @@ -710,6 +710,7 @@ gint position; gint width; gint height; + gboolean maximized; /* grab a reference on the provider factory */ window->provider_factory = thunarx_provider_factory_get_default (); @@ -805,8 +806,12 @@ g_signal_connect_swapped (G_OBJECT (window->launcher), "change-directory", G_CALLBACK (thunar_window_set_current_directory), window); /* determine the default window size from the preferences */ - g_object_get (G_OBJECT (window->preferences), "last-window-width", &width, "last-window-height", &height, NULL); + g_object_get (G_OBJECT (window->preferences), "last-window-width", &width, "last-window-height", &height, "last-window-maximized", &maximized, NULL); gtk_window_set_default_size (GTK_WINDOW (window), width, height); + + /* restore the maxized state of the window */ + if (G_UNLIKELY (maximized)) + gtk_window_maximize (GTK_WINDOW (window)); window->table = gtk_table_new (6, 1, FALSE); gtk_container_add (GTK_CONTAINER (window), window->table); @@ -2491,8 +2496,14 @@ gtk_window_get_size (GTK_WINDOW (window), &width, &height); /* ...and remember them as default for new windows */ - g_object_set (G_OBJECT (window->preferences), "last-window-width", width, "last-window-height", height, NULL); + g_object_set (G_OBJECT (window->preferences), "last-window-width", width, "last-window-height", height, + "last-window-maximized", FALSE, NULL); } + else + { + /* only store that the window is full screen */ + g_object_set (G_OBJECT (window->preferences), "last-window-maximized", TRUE, NULL); + } } }