GNOME Bugzilla – Bug 324426
Open/close tab adds row to terminal
Last modified: 2008-01-30 08:43:22 UTC
Please describe the problem: Steps to reproduce: 1. Open a new gnome-terminal 2. Press Ctrl-Shift-T 3. Press Ctrl-D Actual results: The window resizes to remain at 80x24 when a tab is created, but when the tab is removed the window size changes to 80x25. Expected results: I would expect the window to end up at size 80x24, as it started. Does this happen every time? Other information:
Happens, indeed. Confirmed.
*** Bug 321997 has been marked as a duplicate of this bug. ***
*** Bug 331630 has been marked as a duplicate of this bug. ***
Created attachment 59768 [details] [review] Patch to fix bug Hi, Here is a patch to fix this bug. It's not the cleanest fix but since we only have 7 days before 2.14.0 is suppose to be released I'll submit it anyway. Hopefully, tab handling will be cleaner in the future with the new DnD support in GtkNotebook. Cheers, Tony
Created attachment 59930 [details] [review] 2nd Patch to fix bug Hi, Here is a better patch to fix this bug. It avoids the code duplication in the previous patch and it matches the gnome-terminal 2.12.x semantics for tab removal better. Cheers, Tony
Not in GNOME 2.13.92. Applied the patch locally, tested it briefly. Seems to work just fine. Bumping Priority to raise awareness. Can we please get this committed?
There's nothing major or urgent about this... And we are almost at code freeze now. Of course, it's up to the gnome-terminal maintainer. I'm just dropping inproper priority.
*sigh* Right, we are *almost* at code freeze. It starts March 6. This annoying bug got a working patch. That's what makes applying urgent -- 3 days to go...
The first patch to fix this was submitted less than two weeks ago. Only tested by two people (including the submitter), and we are already after the release candidate. There's no way to revert if the patch eats babies. That's why this should not go into 2.14.0. A devel cycle is six months, introducing a patch two weeks before the final release is asking for trouble. And no, the patch is not a trivial one-liner or something. It may quite possibly introduce other problems...
I do not feel comfortable about applying this either. There are other situations in which similar stuff happens in gnome-terminal anyway, so it should not be so tragic to release 2.14.0 with this.
*** Bug 336138 has been marked as a duplicate of this bug. ***
Why wasn't this in 2.14.1?
*** Bug 162754 has been marked as a duplicate of this bug. ***
Similar bug, with scrollbars: bug 95316.
Created attachment 65467 [details] [review] Fix growth of window due to tab bar disappearance I had this bug and made a patch myself. It is VERY different fix then what y'all have. I am using 2.14.1 and not current CVS. If my patch works for y'all then it would be a much better fix. The idea behind this patch is that it was noticed that the resizing code was run before, and not after, the tab bar was removed. This forces it to re-calculate after the tab is removed.
*** Bug 342898 has been marked as a duplicate of this bug. ***
*** Bug 95316 has been marked as a duplicate of this bug. ***
This is not the ideal fix, as it will cause two resize events sent to the client. Maybe an easier way to fix this and some other resizing bugs is to have a freeze/thaw pair for sending resize signals to the client. Other than that, does it work in fullscreen mode correctly?
I feel that the patch is as good of a fix as possible without any real code reorganization. The patch is putting in code that should have existed already, it is not a workaround, it is a fix. When I was looking around in the code I felt that the current resizing should be improved, but I was trying to work with the current code, not against it. I would be happy to try to improve the code, but I feel that it is a separate issue from this bug. It looks like it works fine in fullscreen mode. I cannot think of any reason it would break the mode since I am just calling for a recaluculation of something that already happened (in response to the swapping-page event), but I also haven't looked at the details of how fullscreen is done.
I was not rejecting the patch, just that it can be improved. I like your patch a lot more than the previous patches. Guilherme, commit?
I made the new bug 342968 to discuss improvements to resizing the window. It already has a patch :)
*** Bug 343158 has been marked as a duplicate of this bug. ***
*** Bug 344410 has been marked as a duplicate of this bug. ***
A side effect bug caused by Tony's 2nd patch: if you have two tabs and close the currently inactive one (by pressing its close (X) button), the active window shrinks to have only 2 rows. Eric's patch seems to be nice.
https://launchpad.net/distros/ubuntu/+source/gnome-terminal/+bug/53157 mentions the same bug, bumping version to 2.15.x.
*ping* What about commiting attachment 65467 [details] [review] ? Works perfectly fine for me, using daily, for month already on different g-t releases. Can we please get this fixed for 2.16?
2006-07-24 Behdad Esfahbod <behdad@gnome.org> Bug 324426 – Open/close tab adds row to terminal Patch from Eric Anderson * src/terminal-window.c (notebook_tab_removed_callback): Reset size if only one tab remaining.
*** Bug 350454 has been marked as a duplicate of this bug. ***
*** Bug 350952 has been marked as a duplicate of this bug. ***
*** Bug 346222 has been marked as a duplicate of this bug. ***
A modified version of this bug exist in v2.16.1 -- when creating a new tab (ctrl-shift-T) or moving between tabs (ctrl-pgUp) the window increases in size, sometimes drastically, and very quickly becomes orders of magnitude bigger than the total screen area. Please reopen bug or suggest I repost as a new bug if unrelated.
Dear Mats, Please apply the patch found in bug 342968 and report _there_ if you still have any problems, and please also report _there_ if everything's fine for you with that patch. It's a bigger rework believed to solve all the resize problems and is waiting for being applied. The more people tell there that it works correctly for them, the sooner it will be applied hopefully. Thanks.
Actually bug 95316's fix also fixed the problem you are having. It has been fixed for 2.18 and has a smaller patch that you can apply.
Mats, you can report whether the patch from bug 95316 helps in bug 338913. I think bug 338913 is closer to your bug, although it does not have the problem when creating new tabs. Really, bug 393413 is your bug, but it has already been closed.
I'm sorry; I'm not sure where to get the source of gnome-terminal and don't know the commands to apply a patch...
(Surprising how fast one can learn to build OSS programs from source with no experience...) I got the source from: svn checkout http://svn.gnome.org/svn/gnome-terminal/trunk gnome-terminal I download the patch to ../src/patchfile I enter the ../src directory I apply the patch using: patch < patchfile Application is successful. I do cd .. I run the autogen.sh script Build is successful. I manage to find a binary in the src folder. I do ./gnome-terminal on the new binary. Result: A new terminal opens. It still has all the same problems as before. Creating new tabs increases the window size. Tabbing left increases the window size. I look in the help>about menu and see the version is 2.16.1, but it seems this is probably just being out-of-date; doing ./gnome-terminal --version yields 2.17.90. Patch used: http://bugzilla.gnome.org/show_bug.cgi?id=342968 one patch to bind them all, wrt to svn HEAD patch 2007-01-23 00:00 UTC 12.56 KB none Edit | Diff
You will need to use xterm or some other terminal to run gnome-terminal. If you already have a g-t open when you do ./gnome-terminal, then it will be using the old version. The help should have 2.17.90.
Thank you Eric for the tip. The new patch does indeed fix all problems I've been having (described in my previous post). I will echo to bug 338913 per your request.
Thank you Eric for the tip. The new patch does indeed fix all problems I've been having (described in my previous post). I will echo to bug 338913 per your request. [edit: and instructions to install for newbies:] sudo install [path/to/src/]gnome-terminal /usr/local/bin