From 63118697eed48dfebe1ec100610976cbff52d21c Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Tue, 5 Mar 2013 09:08:33 -0500 Subject: Automatically set a default window size if unset This resolves problems when the window manager does not set a default size. I noticed this while using KDE3's KWin. Previously it went unfixed because my main window manger always assigns a size. This should resolve the problem. * Added DEFAULT_WINDOW_WIDTH and DEFAULT_WINDOW_HEIGHT * DEFAULT_WINDOW_WIDTH = 600 * DEFAULT_WINDOW_HEIGHT = 800 * If either height or width is missing from the svte configuration in the users directory, use the defaults. --- svte.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'svte.c') diff --git a/svte.c b/svte.c index 3cc4477..44827f6 100644 --- a/svte.c +++ b/svte.c @@ -572,6 +572,11 @@ static void parse_config_file(gchar *config_file) { config->font = DEFAULT_FONT; } + if (NULL == config->window_width || NULL == config->window_height) { + config->window_width = DEFAULT_WINDOW_WIDTH; + config->window_height = DEFAULT_WINDOW_HEIGHT; + } + if(NULL == config->browser_command) { config->browser_command = DEFAULT_BROWSER_COMMAND; } -- cgit v1.2.3