[Xfce4-commits] [apps/xfce4-terminal] 01/01: Use force_resize_window() for GTK>=3.20 to keep rows number constant

noreply at xfce.org noreply at xfce.org
Mon Aug 1 16:43:17 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 39f966d868bd335ea69677581e3d9fed053a45b0
Author: Igor <f2404 at yandex.ru>
Date:   Mon Aug 1 17:41:08 2016 +0300

    Use force_resize_window() for GTK>=3.20 to keep rows number constant
    
    This is useful when adding additional widgets to the window, such as toolbar
    or tabs bar. Otherwise, the window height won't increase which will lead to
    reduction of rows.
---
 terminal/terminal-app.c    | 3 ++-
 terminal/terminal-screen.c | 5 -----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 72f4c4d..b9f17e6 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -768,7 +768,8 @@ terminal_app_open_window (TerminalApp        *app,
             {
               active_terminal = terminal_window_get_active (TERMINAL_WINDOW (window));
               if (G_LIKELY (active_terminal != NULL))
-                terminal_screen_set_size (active_terminal, width, height);
+                terminal_screen_force_resize_window (active_terminal, GTK_WINDOW (window),
+                                                     width, height);
             }
           if ((mask & XValue) && (mask & YValue))
             gtk_window_move (GTK_WINDOW (window), x, y);
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 293454d..974da65 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -1802,11 +1802,6 @@ terminal_screen_force_resize_window (TerminalScreen *screen,
   glong          char_width;
   glong          char_height;
 
-  // Don't need this on gtk>=3.20
-#if GTK_CHECK_VERSION (3,20,0)
-  return;
-#endif
-
   terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
   terminal_return_if_fail (VTE_IS_TERMINAL (screen->terminal));
   terminal_return_if_fail (GTK_IS_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