gnome-terminal incorrectly calculates csd size with long titles

Bug #1681585 reported by Jamie Strandboge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNOME Terminal
Fix Released
Medium
gnome-terminal (Ubuntu)
Fix Released
High
Unassigned

Bug Description

This is: https://bugzilla.gnome.org/show_bug.cgi?id=769898. I see this on 17.04 with gnome3/wayland. For example, if I edit a file using vim deep in a directory and save the file, the size of the terminal changes (as seen with 'stty size'). There are many different scenarios where the terminal size changes and gets smaller and smaller. Using the attached debdiff (uploaded to zesty just now) resolves the issue for me.

Tested patch under gnome3/wayland and it fixes the issue. Tested under Unity7/X and it introduced no regressions.

Tags: patch
Changed in gnome-terminal (Ubuntu):
status: New → Triaged
description: updated
Revision history for this message
Jamie Strandboge (jdstrand) wrote :
description: updated
Changed in gnome-terminal (Ubuntu):
status: Triaged → In Progress
importance: Undecided → High
description: updated
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Test case that demonstrates the issue:
$ mkdir -p ~/really/really/really/really/loooonnnnnnnnnnnnnnnnnnnngggggggggggggggggggg/directory/
$ touch ~/really/really/really/really/loooonnnnnnnnnnnnnnnnnnnngggggggggggggggggggg/directory/foo
$ ls
...

the terminal shrinks and goes into a loop and is unusable

Changed in gnome-terminal:
importance: Unknown → Medium
status: Unknown → Fix Released
tags: added: patch
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I meant to put a cd after the touch. I noticed on my laptop it will only reduce the size of the terminal by one, but in the vm it goes into a loop. On my laptop:

$ mkdir -p ~/really/really/really/really/loooonnnnnnnnnnnnnnnnnnnngggggggggggggggggggg/directory/
$ touch ~/really/really/really/really/loooonnnnnnnnnnnnnnnnnnnngggggggggggggggggggg/directory/foo
$ cd ~/really/really/really/really/loooonnnnnnnnnnnnnnnnnnnngggggggggggggggggggg/directory/
$ stty size
25 85
$ stty size
25 84
$ stty size
25 83
$ ls
foo
$ stty size
25 81
$

Using the patched gnome-terminal it works fine.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-terminal - 3.20.2-1ubuntu8

---------------
gnome-terminal (3.20.2-1ubuntu8) zesty; urgency=medium

  * window-fix-csd-size-calculations-with-long-titles.patch: correctly resize
    csd size with long titles (LP: #1681585)

 -- Jamie Strandboge <email address hidden> Mon, 10 Apr 2017 21:27:37 +0000

Changed in gnome-terminal (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.