GNOME Bugzilla – Bug 727614
Cursor width discrepancy
Last modified: 2017-09-29 12:34:33 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.
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.
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.
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?
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.
*** Bug 729230 has been marked as a duplicate of this bug. ***
As detailed in bug 729230, this one also causes weird behavior in vteapp if a nondefault padding is specified.
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.
A more proper fix was submitted in bug 787710 as commit 41f55bc1. Closing.