After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 324426 - (tabresize) Open/close tab adds row to terminal
(tabresize)
Open/close tab adds row to terminal
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
2.15.x
Other All
: High normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 162754 321997 331630 336138 342898 343158 344410 346222 350454 350952 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-18 22:41 UTC by Adam Hooper
Modified: 2008-01-30 08:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Patch to fix bug (3.24 KB, patch)
2006-02-20 12:46 UTC, Tony Tsui
none Details | Review
2nd Patch to fix bug (5.77 KB, patch)
2006-02-22 12:38 UTC, Tony Tsui
rejected Details | Review
Fix growth of window due to tab bar disappearance (853 bytes, patch)
2006-05-14 23:45 UTC, Eric Anderson
committed Details | Review

Description Adam Hooper 2005-12-18 22:41:46 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:
Comment 1 Guilherme de Siqueira Pastore 2006-01-09 15:32:33 UTC
Happens, indeed. Confirmed.
Comment 2 Claudio Saavedra 2006-02-07 23:27:25 UTC
*** Bug 321997 has been marked as a duplicate of this bug. ***
Comment 3 Guilherme de Siqueira Pastore 2006-02-18 02:36:17 UTC
*** Bug 331630 has been marked as a duplicate of this bug. ***
Comment 4 Tony Tsui 2006-02-20 12:46:34 UTC
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
Comment 5 Tony Tsui 2006-02-22 12:38:16 UTC
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
Comment 6 Karsten Bräckelmann 2006-03-03 02:20:00 UTC
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?
Comment 7 Behdad Esfahbod 2006-03-03 02:22:58 UTC
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.
Comment 8 Karsten Bräckelmann 2006-03-03 02:35:39 UTC
*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...
Comment 9 Behdad Esfahbod 2006-03-03 02:41:15 UTC
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...
Comment 10 Guilherme de Siqueira Pastore 2006-03-04 16:06:34 UTC
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.
Comment 11 Behdad Esfahbod 2006-03-27 03:14:44 UTC
*** Bug 336138 has been marked as a duplicate of this bug. ***
Comment 12 Nicholas Miell 2006-04-18 22:10:58 UTC
Why wasn't this in 2.14.1?
Comment 13 Behdad Esfahbod 2006-05-08 10:21:06 UTC
*** Bug 162754 has been marked as a duplicate of this bug. ***
Comment 14 Behdad Esfahbod 2006-05-08 10:22:34 UTC
Similar bug, with scrollbars: bug 95316.
Comment 15 Eric Anderson 2006-05-14 23:45:15 UTC
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.
Comment 16 Behdad Esfahbod 2006-05-25 08:45:31 UTC
*** Bug 342898 has been marked as a duplicate of this bug. ***
Comment 17 Behdad Esfahbod 2006-05-25 19:15:10 UTC
*** Bug 95316 has been marked as a duplicate of this bug. ***
Comment 18 Behdad Esfahbod 2006-05-25 21:11:54 UTC
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?
Comment 19 Eric Anderson 2006-05-25 21:48:58 UTC
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.
Comment 20 Behdad Esfahbod 2006-05-25 21:56:43 UTC
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?
Comment 21 Eric Anderson 2006-05-26 03:39:12 UTC
I made the new bug 342968 to discuss improvements to resizing the window. It already has a patch :)
Comment 22 Behdad Esfahbod 2006-05-28 06:36:35 UTC
*** Bug 343158 has been marked as a duplicate of this bug. ***
Comment 23 Behdad Esfahbod 2006-06-09 15:44:06 UTC
*** Bug 344410 has been marked as a duplicate of this bug. ***
Comment 24 Egmont Koblinger 2006-07-06 16:36:07 UTC
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.
Comment 25 Daniel Holbach 2006-07-17 09:39:42 UTC
https://launchpad.net/distros/ubuntu/+source/gnome-terminal/+bug/53157 mentions the same bug, bumping version to 2.15.x.
Comment 26 Karsten Bräckelmann 2006-07-23 14:31:43 UTC
*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?
Comment 27 Behdad Esfahbod 2006-07-24 22:12:32 UTC
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.

Comment 28 Behdad Esfahbod 2006-08-08 16:57:14 UTC
*** Bug 350454 has been marked as a duplicate of this bug. ***
Comment 29 Behdad Esfahbod 2006-08-12 20:27:44 UTC
*** Bug 350952 has been marked as a duplicate of this bug. ***
Comment 30 Martin Jonsson 2006-10-12 06:13:57 UTC
*** Bug 346222 has been marked as a duplicate of this bug. ***
Comment 31 Mats Ahlgren 2007-02-08 07:44:45 UTC
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.
Comment 32 Egmont Koblinger 2007-02-08 10:26:28 UTC
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.
Comment 33 Eric Anderson 2007-02-08 16:43:03 UTC
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.
Comment 34 Eric Anderson 2007-02-08 16:54:23 UTC
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.
Comment 35 Mats Ahlgren 2007-02-09 12:03:06 UTC
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...
Comment 36 Mats Ahlgren 2007-02-09 12:32:07 UTC
(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
Comment 37 Eric Anderson 2007-02-09 12:41:19 UTC
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.
Comment 38 Mats Ahlgren 2007-02-09 12:53:20 UTC
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.
Comment 39 Mats Ahlgren 2007-02-09 13:03:33 UTC
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