[Xfce4-commits] [apps/xfce4-terminal] 01/01: Use default terminal geometry when --geometry parameter is used but its value only contains X and Y offsets
noreply at xfce.org
noreply at xfce.org
Tue May 2 04:18:06 CEST 2017
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit e6614c053545197000782b80b70338d6f467a796
Author: Igor <f2404 at yandex.ru>
Date: Mon May 1 22:16:40 2017 -0400
Use default terminal geometry when --geometry parameter is used but its value only contains X and Y offsets
---
terminal/terminal-app.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 8b5ab51..a39db03 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -838,18 +838,24 @@ terminal_app_open_window (TerminalApp *app,
mask = XParseGeometry (geometry, &x, &y, &width, &height);
if (((mask & WidthValue) && (mask & HeightValue)) || ((mask & XValue) && (mask & YValue)))
{
- if ((mask & WidthValue) && (mask & HeightValue))
+ /* use geometry from settings if command line parameter doesn't provide it */
+ if (!(mask & WidthValue) || !(mask & HeightValue))
{
- active_terminal = terminal_window_get_active (TERMINAL_WINDOW (window));
- if (G_LIKELY (active_terminal != NULL))
- {
- /* save window geometry to prevent overriding */
- terminal_window_set_grid_size (TERMINAL_WINDOW (window), width, height);
+ g_free (geometry);
+ g_object_get (G_OBJECT (app->preferences), "misc-default-geometry", &geometry, NULL);
+ XParseGeometry (geometry, NULL, NULL, &width, &height);
+ }
- terminal_screen_force_resize_window (active_terminal, GTK_WINDOW (window),
- width, height);
- }
+ active_terminal = terminal_window_get_active (TERMINAL_WINDOW (window));
+ if (G_LIKELY (active_terminal != NULL))
+ {
+ /* save window geometry to prevent overriding */
+ terminal_window_set_grid_size (TERMINAL_WINDOW (window), width, height);
+
+ terminal_screen_force_resize_window (active_terminal, GTK_WINDOW (window),
+ width, height);
}
+
if ((mask & XValue) && (mask & YValue))
{
screen = gtk_window_get_screen (GTK_WINDOW (window));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list