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 415277 - Garbage displayed after resizing whilst using an alternate screen
Garbage displayed after resizing whilst using an alternate screen
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.15.x
Other All
: Normal normal
: ---
Assigned To: Chris Wilson
VTE Maintainers
[needed-next]
: 415278 (view as bug list)
Depends on:
Blocks: 336238
 
 
Reported: 2007-03-06 11:55 UTC by Laurent Pichler
Modified: 2014-04-06 18:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
fix (6.63 KB, patch)
2013-09-29 10:17 UTC, Egmont Koblinger
committed Details | Review

Description Laurent Pichler 2007-03-06 11:55:27 UTC
Please describe the problem:
The Screen is not cleared correctly after changing a windows size.

This bug is really unnerving when using gnome-terminal with a specific pattern.

Steps to reproduce:
1. 
2. 
3. 


Steps to reproduce: 
- Open new terminal
- ls -l /usr/bin
- Maximize Terminal Window with window manager's maximize facility 
- ls -l /usr/bin | less
- De-Maximize Window
- Exit less (by using the "q" command)


I use Terminal with this pattern _a lot_ , and so this really annoys the heck
out of me.. :-/
I would be greatful for a quick fix.

Actual results:
This reproducibly leads to junk being displayed on the line next to the command
prompt! 

Expected results:
Screen being cleared normally, no annoying junk right of the command prompt.

Does this happen every time?
Yes

Other information:
How can it be this bug has not been filed yet? It's really unnerving and has been existing for several years!
Comment 1 Chris Wilson 2007-03-06 12:10:14 UTC
*** Bug 415278 has been marked as a duplicate of this bug. ***
Comment 2 Chris Wilson 2007-03-06 12:36:39 UTC
I was aware of similar garbage being displayed after resizing whilst using an alternate screen and thought I had succeeded in implementing a workaround. However, it still fails for your testcase. :-(
Unfortunately due to the timing we have missed the cut-off for gnome-2.18, so I might as well take the time to work out just why resizing+alternates goes so wrong.

Thankyou for your report.
Comment 3 Egmont Koblinger 2013-09-27 16:39:04 UTC
Whatever strategy is being used for resizing the normal screen (including traking the cursor), it should resize the normal screen the same way even if the alternate one is visible.

Bug 336238 depends on this. Current work-in-progress patches in that bug already fix this, but probably it'd be nicer to split the work in two: fix this issue first, then build the other one on top of it.
Comment 4 Behdad Esfahbod 2013-09-27 19:39:24 UTC
Egmont.  Have separate patch for this?
Comment 5 Egmont Koblinger 2013-09-27 20:34:19 UTC
I can split the rewrapping patch in two. Probably it'd make reviewing/debugging easier.

Basically it's the bits that figuring out the insert/scroll deltas, cursor position etc. work on "normal_screen" rather than "screen".

Probably it should do the work on both...???
Comment 6 Behdad Esfahbod 2013-09-27 20:41:21 UTC
Whatever you think is best.  I'm just trying to make some progress before you move on ;).

I'm working on the stream right now.
Comment 7 Egmont Koblinger 2013-09-29 10:17:15 UTC
Created attachment 256010 [details] [review]
fix

Fix added, please test.

Most of the code is just moving stuff to a new method.

The new functionality is that the normal screen is also resized even when the alternate one is visible.

scroll_delta has to be set differently depending on whether the screen we're resizing is the active one: vte_terminal_queue_adjustment_value_changed() versus simply just setting.

Adjusting the saved cursor's position is new too (backported from the rewrapping patch), it is required for when you maximize/unmaximize opposite than in the original bugreport.
Comment 8 Egmont Koblinger 2013-09-29 10:26:37 UTC
(Patch goes on top of git vte-0-34)
Comment 9 Behdad Esfahbod 2013-09-29 19:59:54 UTC
Committed.  Thanks!