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 760718 - VTE in GTKScrolledWindow only sizes to one row
VTE in GTKScrolledWindow only sizes to one row
Status: RESOLVED NOTABUG
Product: vte
Classification: Core
Component: general
0.42.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-16 15:55 UTC by Gerald Nunn
Modified: 2016-01-17 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gerald Nunn 2016-01-16 15:55:58 UTC
If I add a VTE widget to a GtkScrolledWindow and set the size of the VTE to 35 rows via vte_terminal_set_size it only actually sizes to one 1 row. Is this related to bug 757448, "Placing Vte in a GtkScrolledWindow results in artifacts at the bottom", or should I be programatically sizing the GtkScrolledWindow?
Comment 1 Christian Persch 2016-01-16 15:57:51 UTC
GtkScrolledWindow is simply incompatible with VteTerminal.
Comment 2 Gerald Nunn 2016-01-16 17:08:14 UTC
Thanks for the quick reply, would it make sense for VteTerminal to emit a warning when a GtkScrolledWindow is the direct parent and/or update the documentation to include a note about this. I suspect the inclination of most developers new to VteTerminal would be to place it in a GtkScrolledWindow rather then use a separate GtkScrollbar.
Comment 3 Christian Persch 2016-01-16 18:19:14 UTC
I added a note to the docs.
Comment 4 Egmont Koblinger 2016-01-16 23:50:55 UTC
Isn't this a dup of the recently fixed bug 757448?
Comment 5 Egmont Koblinger 2016-01-16 23:53:35 UTC
Oops, didn't read the last sentence of the original report :)

Gerald, could you please apply that patch and let us know if it fixes the problem?

Christian: It would be nice to have a new 0.42.x tarball released so that next Ubuntu LTS picks up this fix. It doesn't effect g-t but might effect people wishing to develop a new vte-based app.
Comment 6 Gerald Nunn 2016-01-17 00:20:31 UTC
So I built the 42.2 tag and manually applied the patch specified here to vte.cc. I still have the same issue. I can tell the patch is applied though because the artifact at the bottom that I was getting before is now gone. Also to clarify, the vte in the scrolled window it is actually 2 rows high, not 1.

I'm somewhat new to GTK development, so just to make sure I'm doing this right I'm setting up the ScrolledWindow as follows (D code, but it's pretty straight forward):

        terminalOverlay = new Overlay();
        ScrolledWindow sw = new ScrolledWindow(vte);
        sw.setPolicy(PolicyType.NEVER, PolicyType.AUTOMATIC);
        sw.setHexpand(true);
        terminalOverlay.add(sw);

When I use GTKScrollbar with the vte not in a ScrolledWindow it is sized as expected.
Comment 7 Christian Persch 2016-01-17 12:41:32 UTC
I don't think this is bug 757448, but is simply due to the incompatibility of VteTerminal with GtkScrolledWindow's sizing algorithm.

(@Egmont: I can certainly tag a new 0.42.x release, but as per usual, someone else will have to produce the tarball.)
Comment 8 Egmont Koblinger 2016-01-17 13:28:24 UTC
(@ChPe: Yup, that's what I meant, if you could please ask whoever creates the tarballs, thanks!)