[Xfce4-commits] [apps/xfce4-terminal] 01/01: Add support for geometry x/y offsets

noreply at xfce.org noreply at xfce.org
Sun Jul 24 13:26:38 CEST 2016


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 0b6025a3f2e2b0203afdf4ab5347dee7fbcf99e4
Author: Igor <f2404 at yandex.ru>
Date:   Sun Jul 24 14:26:07 2016 +0300

    Add support for geometry x/y offsets
    
    Fixes #12721
---
 terminal/terminal-app.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 8f17d41..1b940a7 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -618,7 +618,7 @@ terminal_app_open_window (TerminalApp        *app,
   gint             attr_screen_num;
 #if GTK_CHECK_VERSION (3,20,0)
   TerminalScreen  *active_terminal;
-  gint             mask = NoValue;
+  gint             mask = NoValue, x, y;
   guint            width, height;
 #endif
 
@@ -747,13 +747,17 @@ terminal_app_open_window (TerminalApp        *app,
 
       /* try to apply the geometry to the window */
 #if GTK_CHECK_VERSION (3,20,0) && defined (GDK_WINDOWING_X11)
-      /* TODO: support x/y offsets */
-      mask = XParseGeometry (geometry, NULL, NULL, &width, &height);
-      if ((mask & WidthValue) && (mask & HeightValue))
+      mask = XParseGeometry (geometry, &x, &y, &width, &height);
+      if (((mask & WidthValue) && (mask & HeightValue)) || ((mask & XValue) && (mask & YValue)))
         {
-          active_terminal = terminal_window_get_active (TERMINAL_WINDOW (window));
-          if (G_LIKELY (active_terminal != NULL))
-            terminal_screen_set_size (active_terminal, width, height);
+          if ((mask & WidthValue) && (mask & HeightValue))
+            {
+              active_terminal = terminal_window_get_active (TERMINAL_WINDOW (window));
+              if (G_LIKELY (active_terminal != NULL))
+                terminal_screen_set_size (active_terminal, width, height);
+            }
+          if ((mask & XValue) && (mask & YValue))
+            gtk_window_move (GTK_WINDOW (window), x, y);
         }
       else
 #else

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list