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 727614 - Cursor width discrepancy
Cursor width discrepancy
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.36.x
Other Linux
: Normal minor
: ---
Assigned To: VTE Maintainers
VTE Maintainers
: 729230 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-04-04 16:04 UTC by Egmont Koblinger
Modified: 2017-09-29 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix(?) (431 bytes, patch)
2014-04-04 18:09 UTC, Egmont Koblinger
committed Details | Review

Description Egmont Koblinger 2014-04-04 16:04:40 UTC
I have "Monospace 8" font (6x13 pixels), I-Beam cursor, vte-0.36/g-t-3.12.

~/.config/gtk-3.0/gtk.css:
VteTerminal {
    -VteTerminal-inner-border: 1 3 1 1;
    -GtkWidget-cursor-aspect-ratio: 0.15;
}

In g-t, in the first and second tab (in the order of being opened) the cursor is 2px wide. If I open more tabs, there the cursor becomes 1px wide only.

Each tab seems to remember its cursor width, except when I close all but one. If a tab of 1px cursor remains the only tab, there the cursor becomes 2px wide.
Comment 1 Egmont Koblinger 2014-04-04 17:27:55 UTC
Broken by https://git.gnome.org/browse/vte/commit/?id=e68cfbac308e98d704fbca579bab53998904c7ad - weird, seems irrelevant at first glimpse.

In the broken tabs vte_terminal_style_updated() is not called, and hence the cursor-aspect-ratio is not looked up and the hardcoded default of 0.04 is used.
Comment 2 Egmont Koblinger 2014-04-04 18:09:29 UTC
Created attachment 273601 [details] [review]
fix(?)

This seems to work, but ChPe I'd need your input on what's the right solution for the problem, probably not this one.

It's not just the cursor width, it's also the padding/inner-border that's effected. If you have a larger top or left padding, that one applies to the first two tabs only, and your whole g-t window keeps growing on every tab change.
Comment 3 Christian Persch 2014-04-06 09:40:52 UTC
I thought that widgets get a style-updated when they're added to a container for the first time, but maybe that's changed in gtk?
Comment 4 Egmont Koblinger 2014-04-06 13:56:46 UTC
I recently upgraded from saucy to trusty beta, and the fact that I just noticed this bug even though I have played with both the cursor width and the padding previously makes it quite likely that it indeed broke with the gtk 3.8.4->3.10.7 update. I can't tell for sure though.
Comment 5 Egmont Koblinger 2014-04-30 00:15:59 UTC
*** Bug 729230 has been marked as a duplicate of this bug. ***
Comment 6 Egmont Koblinger 2014-04-30 00:18:29 UTC
As detailed in bug 729230, this one also causes weird behavior in vteapp if a nondefault padding is specified.
Comment 7 Egmont Koblinger 2014-05-25 17:31:57 UTC
Comment on attachment 273601 [details] [review]
fix(?)

Committed as 7a8256af for now, since it was driving me crazy.

Keeping the open so we can see if a more proper fix is desired.
Comment 8 Egmont Koblinger 2017-09-29 12:34:33 UTC
A more proper fix was submitted in bug 787710 as commit 41f55bc1. Closing.