[Xfce4-commits] <xfce4-terminal:master> Correct window size with multiple tabs.

Nick Schermer noreply at xfce.org
Sat Dec 29 23:14:01 CET 2012


Updating branch refs/heads/master
         to 062cc523454d4ef5d36e872a4c4ff5b9dd1ae2eb (commit)
       from f0111d369bd9f76ce7883461a1491e5c87ac5a0e (commit)

commit 062cc523454d4ef5d36e872a4c4ff5b9dd1ae2eb
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Dec 29 23:12:47 2012 +0100

    Correct window size with multiple tabs.

 terminal/terminal-window-dropdown.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
index 11bee7e..8f5950a 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -541,6 +541,7 @@ terminal_window_dropdown_animate_down (gpointer data)
 
   /* resize */
   gtk_widget_set_size_request (dropdown->viewport, req2.width, viewport_h);
+  gtk_window_resize (GTK_WINDOW (dropdown), req2.width, viewport_h);
 
   return viewport_h < req1.height;
 }
@@ -711,7 +712,8 @@ terminal_window_dropdown_show (TerminalWindowDropdown *dropdown,
   if (!visible)
     gtk_window_present_with_time (GTK_WINDOW (dropdown), timestamp);
 
-  if (dropdown->animation_time > 0)
+  if (dropdown->animation_time > 0
+      && viewport_h < h)
     {
       dropdown->animation_dir = ANIMATION_DIR_DOWN;
       dropdown->animation_timeout_id =
@@ -719,6 +721,11 @@ terminal_window_dropdown_show (TerminalWindowDropdown *dropdown,
                               terminal_window_dropdown_animate_down, dropdown,
                               terminal_window_dropdown_animate_destroyed);
     }
+  else
+    {
+      /* make sure all the content fits */
+      gtk_window_resize (GTK_WINDOW (dropdown), w, h);
+    }
 }
 
 


More information about the Xfce4-commits mailing list