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 95316 - (scrollresize) Switching between scollbar/no-scrollbar tabs expands window
(scrollresize)
Switching between scollbar/no-scrollbar tabs expands window
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
2.0.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-10-09 17:34 UTC by mrroach
Modified: 2006-10-12 17:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the problem (1.50 KB, patch)
2003-08-07 19:42 UTC, Manuel Clos
none Details | Review
Fix for scrollbar cause of window growth (932 bytes, patch)
2006-05-24 04:30 UTC, Eric Anderson
none Details | Review
Same basic fix, also removes code no longer needed due to patch (1.81 KB, patch)
2006-05-24 17:14 UTC, Eric Anderson
none Details | Review
Re-added functionality of previously removed code with better code (1.79 KB, patch)
2006-05-25 17:40 UTC, Eric Anderson
none Details | Review

Description mrroach 2002-10-09 17:34:51 UTC
If I have two profiles, one with scrollbar enabled and one with scrollbar
disabled and I open a terminal with both profiles as tabs, clicking from
without_scrollbar to with_scrollbar will cause the window to expand.

So, eventually, I end up with a window that goes waaay off the right hand
side of the screen.
Comment 1 Heath Harrelson 2002-11-19 23:24:20 UTC
I can reproduce in 2.1 as well.
Comment 2 Chris Davidson 2003-05-06 01:02:36 UTC
this also happens in version 2.2.1 of gnome-terminal
Comment 3 Olav Vitters 2003-06-21 23:12:03 UTC
Also reproducable with 2.3.1, vte 0.11.10
Comment 4 Manuel Clos 2003-08-07 19:42:01 UTC
Created attachment 19008 [details] [review]
patch to fix the problem
Comment 5 Manuel Clos 2003-08-07 19:44:31 UTC
Hi all,

this patch fixes the problem. The only part I don't like too much is
were it calculates the amount of space to remove:

+      old_grid_width -= size.width / char_width;

I don't know if this will work on all setups, but it should work on
most though.

adding PATCH keyword.
Comment 6 Manuel Clos 2003-09-24 18:31:33 UTC
Anyone reviewing the patch?

Can the reporter test the patch?
Comment 7 Eric Anderson 2006-05-24 04:30:06 UTC
Created attachment 66108 [details] [review]
Fix for scrollbar cause of window growth

This patch I find to be better. The main problem with the old one is that when a scrollbar is enabled on a profile, the window size increases, and when it is hidden, the window size decreases. The other patch did not decrease the window size. In additition, it relied on private information in the terminal-screen (the scrollbar widget).

This new patch is much simpler. All it basically does is hide the old terminal and show the new terminal (since it may have been previously hidden by the first part). Gtk then does the rest. :)
Comment 8 Eric Anderson 2006-05-24 04:32:11 UTC
I guess I should have mentioned explicitly that the old patch did work (after slight modification - mainly I implemented screen_get_scrollbar). I don't know if that just didn't make its way into the patch or if that is just not in the GNOME 2.14.1 release (I would assume it was created for the patch because it was not terminal_screen_get_scrollbar).
Comment 9 Eric Anderson 2006-05-24 17:14:22 UTC
Created attachment 66140 [details] [review]
Same basic fix, also removes code no longer needed due to patch

This patch is slightly cleaner and has comments. It also removes some code that forces the window size that is no longer needed due to the patch.
Comment 10 Eric Anderson 2006-05-25 17:40:30 UTC
Created attachment 66207 [details] [review]
Re-added functionality of previously removed code with better code

So removing alltogether the old code had its problem. When you resized a terminal, that was the only terminal that experience the resize. If you had multiple tabs, the background tabs would not update to the new grid width and height. This is not really WRONG, but it did remove a feature. So the new patch adds back in the functionality, but in a better way. It sets the grid size directly on the terminal-widget before the window resize instead of resizing the window twice (since terminal_window_set_active calls terminal_window_set_size).
Comment 11 Behdad Esfahbod 2006-05-25 19:15:10 UTC

*** This bug has been marked as a duplicate of 324426 ***
Comment 12 Behdad Esfahbod 2006-05-25 19:48:06 UTC
Forget about the dup.  sorry.
Comment 13 Behdad Esfahbod 2006-05-25 19:51:42 UTC
Confirmed that the patch fixes bug #338913 and this one.


Guilherme, may I commit it.
Comment 14 Thomas Wood 2006-10-10 09:39:06 UTC
Also confirming that the latest patch fixes this bug and bug 338913.

These bugs are very irritating if you work with multiple tabs, so if there are no issues with the patch, please could we get it applied as soon as possible.
Comment 15 Thomas Wood 2006-10-10 09:49:06 UTC
I notice bug 342968 is related, and possibly contains a newer patch. If this is the case could we mark this bug as superceded by bug 342968 to avoid confusion?
Comment 16 Eric Anderson 2006-10-10 14:41:38 UTC
As I see it, there is very little reason why this patch should not be committed; it fixes many bugs with the current resize system with no known side effects.

Bug 342968 does have newer patches, but they revamp the resizing system (making it from explicit to implicit). The patch should be more hesitantly applied and is probably not yet completed.
Comment 17 Wouter Bolsterlee (uws) 2006-10-11 11:29:21 UTC
Confirming the patch works for me too. Why not commit it until a "better" patch comes around?
Comment 18 Behdad Esfahbod 2006-10-11 17:37:58 UTC
(In reply to comment #17)
> Confirming the patch works for me too. Why not commit it until a "better" patch
> comes around?

Wouter, please go ahead and commit it.  In HEAD and gnome-2-16.  (seems like someone moved help/es to gnome-doc-utils and broke build too. :( )
Comment 19 Wouter Bolsterlee (uws) 2006-10-12 17:35:24 UTC
I've committed the patch to HEAD and gnome-2-16.

2006-10-12  Wouter Bolsterlee  <wbolster@gnome.org>

    * src/terminal-window.c: (terminal_window_set_active),
    (notebook_page_selected_callback):
    Hopefully fix the annoying window resizing bug triggered
    by switching between multiple tabs. Fixes bug #95316,
    patch by Eric Anderson.