! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Window size changes when tab bar appers/disappers
Status:
RESOLVED: MOVED
Product:
Xfce4-terminal
Component:
General

Comments

Description Kay Bouché 2018-05-20 19:28:52 CEST
Hi,

when I open/close a tab so the tab bar appers/disappers, the window size changes (the actual terminal screens keep their size). To me, this is unexpected/annoying, especially when arranging multiple windows on my screen. xfce4-terminal eithers goes beyond the screen or overlaps with another window, when the tab bar appers.

I looked into the code and found a fix:

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index bb455937..1a7f4a1b 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -2682,14 +2682,8 @@ terminal_window_notebook_show_tabs (TerminalWindow *window)
   /* set the visibility of the tabs */
   if (gtk_notebook_get_show_tabs (notebook) != show_tabs)
     {
-      /* store size */
-      terminal_window_size_push (window);
-
       /* show or hide the tabs */
       gtk_notebook_set_show_tabs (notebook, show_tabs);
-
-      /* update the window geometry */
-      terminal_window_size_pop (window);
     }
 }
 
This seems to be the same issue as reported in https://bugzilla.xfce.org/show_bug.cgi?id=10551 (looks like has become an issue again after that) and also https://bugzilla.xfce.org/show_bug.cgi?id=1936 (solution presented: never hide tab bar, which is not favorable I'd say).

Would be great to see this go into the master branch! Please tell me, if any further changes are favorable (e.g. providing an option in the settings or so...).


Kind Regards
Kay
Comment 1 Igor editbugs 2018-05-27 17:58:48 CEST
Hi Kay,

Preserving the terminal size (i.e. its width and heights in chars), as opposed to the window size, when adding/closing tabs, showing/hiding toolbar, etc., is one of the xfce4-terminal key features. A lot of effort has been made to implement it and to make sure it keeps working when migrating from GTK2 to GTK3 as well as between different versions of GTK3. I'm not going to drop it as I think it's really important for the users.

As for the bugs you've referenced to:
bug 1936 was submitted against a problem with adding tabs in maximized mode - as far as I can tell, this problem does not exist anymore.
bug 10551 describes the following problem: if a terminal window is not maximized but still takes (almost) all vertical space, adding second tab may make the last terminal row go outside of the visible space. That I can still reproduce.

Is your problem the same as described by bug 10551, or are you unhappy with changing window size in general?
Comment 2 Kay Bouché 2018-06-19 20:17:04 CEST
Hi Igor,

sorry for replying a bit late. Since I patched and manually installed my xfce4-terminal, the issue did not reapper even when reinstalling xfce4-terminal as usual - don't know what I'm doing wrong (seems I can't rollback to the distro shipped version). However, I'm still able to reproduce the issue in a VM (just wanted to verify it again).

I'm having the same issue as it was described in bug 10551. It does not appear when chaning to Maximized or Fullscreen mode (the windows size then stays the same, the amount of visible rows and columns in chars changes).
But only, when tiling left, right, or to any corner (left top, left bottom etc., the 4 variants). Additionally to the window becoming too large to see the last line when the tab bar appears and the window is tiled to the left/right half or in the lower left or right corner, the size of the windows is somehow smaller after removing the second tab.

"Preserving the terminal size (i.e. its width and heights in chars), as opposed to the window size, when adding/closing tabs, showing/hiding toolbar, " does not work anyway. For example, if I change into fullscreen mode by hitting F11 and adding/removing the tab bar by adding/removing tabs.

Regards
Kay
Comment 3 www.j0n4t 2018-10-14 21:55:19 CEST
Hi people,

How about just leaving an option to never show the tab bar, like "MiscAlwaysHideTabs" in the ~/.config/xfce4/terminal/terminalrc for example? The window will not need to resize anymore, and you can still switch tabs with a CTRL-PGUP/PGDN.

Regards,
Jonathan
Comment 4 Igor editbugs 2018-10-14 23:44:10 CEST
Hi Jonathan,

Even if tabs are hidden, there are still cases when the window would resize: on showing/hiding toolbar or menubar.

I will probably add an option that will restrict the window from resizing - with the drawback of resizing the terminal (width x height) but that's what Kay is looking for, it seems.
Comment 5 Igor editbugs 2019-03-22 18:10:21 CET
Just for the reference: bug #10551 has just been fixed.
Comment 6 Jordan Christiansen 2019-11-14 04:09:26 CET
> Preserving the terminal size (i.e. its width and heights in chars),
> as opposed to the window size, when adding/closing tabs, showing/hiding
> toolbar, etc., is one of the xfce4-terminal key features.

Maybe I'm experiencing a different bug than Kay, but this statement is not true for me. When I open a new tab and the tab bar appears, the window grows so that the terminal has the same number of columns and rows. But when I close a tab, the window doesn't change size. The terminal grows to fill the window. If I open and close tabs multiple times, the window grows until it hits the edges of the screen.
Comment 7 Jordan Christiansen 2019-11-14 05:07:00 CET
Created attachment 9228 
Reproducing the issue

Arch Linux
Gnome 3.34
xfce4-terminal 0.8.8
Comment 8 Git Bot editbugs 2020-05-24 23:43:46 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/xfce4-terminal/-/issues/26.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #14411

Reported by:
Kay Bouché
Reported on: 2018-05-20
Last modified on: 2020-05-24

People

CC List:
2 users

Version

Version:
0.8.7.4

Attachments

Reproducing the issue (240.82 KB, video/webm)
2019-11-14 05:07 CET , Jordan Christiansen
no flags

Additional information