Created attachment 6791 Screen "character" geometry info Display terminal screen geometry (columns x rows), including during pointer aided resizing of the terminal window - holding left pointer button down on resize box. The usability value is - it shows, in the quickest and least disruptive way, the quantity of the actual elements of the geometry of the terminal screen, in every way use.
Yeah, the thing is that it was shown by vte itself, not the terminal. Compare running `vte` and `vte-2.91` and changing their sizes - the first one shows its geometry while the latter one does not.
Indeed, this nice feature seems lost in the meantime Terminal emulator widget used by GTK+ based terminals https://developer.gnome.org/vte https://git.gnome.org/browse/vte https://download.gnome.org/sources/vte = Resize info = - vte - $ rpm -qf /usr/bin/vte vte-devel-0.28.2-14.fc22.x86_64 - OK - $ rpm -qf /usr/bin/vte vte-devel-0.28.2-16.fc23.x86_64 - OK - $ rpm -qf /usr/bin/vte vte-devel-0.28.2-17.fc24.x86_64 - OK - ~~~~~~~~~ - vte3 - $ rpm -qf /usr/bin/vte2_90 vte3-devel-0.36.5-1.fc22.x86_64 - OK - $ rpm -qf /usr/bin/vte2_90 vte3-devel-0.36.5-1.fc23.x86_64 - OK - $ rpm -qf /usr/bin/vte2_90 vte3-devel-0.36.5-2.fc24.x86_64 - NONE - ~~~~~~~~~~~ - vte291 - $ rpm -qf /usr/bin/vte-2.91 vte291-devel-0.40.3-1.fc22.x86_64 - OK - $ rpm -qf /usr/bin/vte-2.91 vte291-devel-0.42.5-1.fc23.x86_64 - OK - $ rpm -qf /usr/bin/vte-2.91 vte291-devel-0.44.2-1.fc24.x86_64 - NONE -
Created attachment 6798 VTEs Resize info comparance In fact, "Resize info" feature -is- present in version 0.45.90 - API vte-2.91 $ rpm -qf /usr/bin/vte-2.91 vte291-devel-0.45.90-1.fc26.x86_64 It is interesting to compare, despite the absence of this feature within previous vte-2.91 version - 0.44.2 (1a), mate-terminal (1b) still reveals this functionality, as it is self-sustained. As opposed to that, xfce4-terminal (2b) does not show it, although vte-2.91 version - 0.45.90 (2a) to which it relates, supports this feature.
(In reply to poma from comment #3) > Created attachment 6798 > VTEs Resize info comparance > > In fact, "Resize info" feature -is- present in version 0.45.90 - API vte-2.91 poma, how do you see that it's supported? what is the API name? > As opposed to that, xfce4-terminal (2b) does not show it, > although vte-2.91 version - 0.45.90 (2a) to which it relates, > supports this feature. 0.45.90 is a development version; development versions are not supported by (most of) the distributions. However, if 0.46.0 will offer new features , it is possible add an early support of them now.
(In reply to Igor from comment #4) > (In reply to poma from comment #3) > > Created attachment 6798 > > VTEs Resize info comparance > > > > In fact, "Resize info" feature -is- present in version 0.45.90 - API vte-2.91 > > poma, how do you see that it's supported? what is the API name? > If it is still not clear from the accompanying illustrations and comments, vte-2.91 ver. 0.45.90 supports it, and consequently gnome-terminal relays it, the Resize info. https://git.gnome.org/browse/vte/tree/configure.ac?h=0.45.90#n40 VTE_API_MAJOR_VERSION=2 VTE_API_MINOR_VERSION=91 https://bugzilla.redhat.com/show_bug.cgi?id=1126860#c7 "It is quite confusing, indeed, and you are not the first one. :) There are vte, vte3 and vte291 packages in Fedora: * vte is the (ancient) GTK+ 2.x widget, which is unmaintained upstream. * vte3 is the GTK+ 3.x widget with the vte-2.90 API/ABI. ie. the vte-0.36.x series of tarballs. It still receives bug-fixes. * vte291 is the GTK+ 3.x widget with the vte-2.91 API/ABI. ie. everything newer than the vte-0.36.x series. It is under active development and bug-fixes." > > As opposed to that, xfce4-terminal (2b) does not show it, > > although vte-2.91 version - 0.45.90 (2a) to which it relates, > > supports this feature. > > 0.45.90 is a development version; development versions are not supported by > (most of) the distributions. > However, if 0.46.0 will offer new features , it is possible add an early > support of them now. s/0.45.90/xfce4-terminal/ consider this, and you'll get the point.;) Besides ...
Created attachment 6803 VTEs Resize info relay - vte-2.91 and gnome-terminal to "paraphrase", ... it's better to see once than hear a hundred times ;)
- Reintroduces Resize info for the gnome-terminal window: Make geometry work better with gtk 3.20 https://git.gnome.org/browse/gnome-terminal/commit/?id=88bd325 - Reintroduces Resize info for the vte-2.91 widget: gtk: Pass NULL for geometry widget https://git.gnome.org/browse/vte/commit/?id=28871b3 Ref. resizing and geometry (snap to character cells) regressed with Gtk 3.19+ https://bugzilla.gnome.org/show_bug.cgi?id=760944
poma, thanks for the info. Indeed, a small change similar to https://git.gnome.org/browse/vte/commit/?h=0.45.90&id=28871b33b03d2f7e2df8c065189547add12f673d makes vte show the geometry info. But, it also makes the geometry setting inaccurate: the size shown does not match the actual size, and the actual size is smaller than requested. It seems I will have to see how to fix those geometry hints.
Created attachment 6808 Resize info test Resize info test --- terminal/terminal-screen.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c index 23f4d92..7e8f796 100644 --- a/terminal/terminal-screen.c +++ b/terminal/terminal-screen.c @@ -1791,7 +1791,12 @@ terminal_screen_set_window_geometry_hints (TerminalScreen *screen, hints.min_height = hints.base_height + hints.height_inc * 2; gtk_window_set_geometry_hints (GTK_WINDOW (window), + +#if GTK_CHECK_VERSION (3, 19, 5) + NULL, +#else screen->terminal, +#endif &hints, GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE -- 2.7.4
Should the Xfce Terminal switch from "pixel-based" geometry $ man 1 xfce4-terminal ... Window Options ... --geometry=geometry Sets the geometry of the last-specified window to geometry. Read X(7) for more information on how to specify window geometries. to "character-based" geometry $ man 1 mate-terminal ... Window options... ... --geometry=GEOMETRY Set the window size; for example: 80x24, or 80x24+200+200 (COLSxROWS+X+Y) Ref. vte291: Fix geometry issues https://github.com/mate-desktop/mate-terminal/commit/387af1f
(In reply to poma from comment #10) > Should the Xfce Terminal switch from "pixel-based" geometry > > $ man 1 xfce4-terminal > ... > Window Options > ... > --geometry=geometry > Sets the geometry of the last-specified window to geometry. Read > X(7) for more information on how to specify window geometries. > > > to "character-based" geometry > > $ man 1 mate-terminal > ... > Window options... > ... > --geometry=GEOMETRY > Set the window size; for example: 80x24, or 80x24+200+200 > (COLSxROWS+X+Y) Geometry is already taken as columns x rows +- Xoff +- Yoff. Columns and rows are in "characters", Xoff and Yoff are in pixels.
(In reply to Igor from comment #11) > (In reply to poma from comment #10) > > Should the Xfce Terminal switch from "pixel-based" geometry > > > > $ man 1 xfce4-terminal > > ... > > Window Options > > ... > > --geometry=geometry > > Sets the geometry of the last-specified window to geometry. Read > > X(7) for more information on how to specify window geometries. > > > > > > to "character-based" geometry > > > > $ man 1 mate-terminal > > ... > > Window options... > > ... > > --geometry=GEOMETRY > > Set the window size; for example: 80x24, or 80x24+200+200 > > (COLSxROWS+X+Y) > > Geometry is already taken as columns x rows +- Xoff +- Yoff. Columns and > rows are in "characters", Xoff and Yoff are in pixels. That's right, but unfortunately only in theory, geometry looks like a broken everywhere within VTE GTK+ 3 and it's applications. No wonder Clasen wants to remove this feature, one way or another. :) https://bugzilla.gnome.org/show_bug.cgi?id=760944#c2 Apropos mate-terminal's geometry $ rpm -qf /usr/share/man/man1/mate-terminal.1.gz mate-terminal-1.12.1-1.fc22.x86_64 $ man /usr/share/man/man1/mate-terminal.1.gz | grep geometry -A1 --geometry=GEOMETRY Set the window size; for example: 80x24, or 80x24+200+200 (ROWSxCOLS+X+Y) $ ldd /usr/bin/mate-terminal | grep vte libvte.so.9 => /lib64/libvte.so.9 (0x00007fe5db7c9000) $ rpm -qf /lib64/libvte.so.9 vte-0.28.2-14.fc22.x86_64 $ ./mate-terminal-1.12.1/configure --help | grep gtk --with-gtk=2.0|3.0 which gtk+ version to compile against (default: 2.0) vte291: Fix geometry issues https://github.com/mate-desktop/mate-terminal/commit/387af1f +/* width and height are character-based in vte 0.38, pixel-based in previous versions */ 2015-15-11 drop old code for VTE < 0.38 (it was used in GTK+2 build) https://github.com/mate-desktop/mate-terminal/commit/b2919d2 -/* width and height are character-based in vte 0.38, pixel-based in previous versions */ 2016-26-05 Reading all this, one can conclude "character-based" -is- within vte-0.28 version, and should always be as VTE's geometric method according to Geometry Specifications https://www.x.org/archive/X11R6.7.0/doc/X.7.html#sect6 "The WIDTH and HEIGHT parts of the geometry specification are usually measured in either pixels or characters, depending on the application." So the question remains, where the "pixel-based" geometry came from and whether it actually ever used.
Created attachment 6813 VTEs geometry comparance VTEs theoretical and practical geometry comparance xterm geometry is 100% correct. xfce4-terminal geometry: - specified as 20x10 characters i.e. columns x rows - realized as 31x9 characters i.e. columns x rows - presented as 32x11 characters i.e. columns x rows
(In reply to poma from comment #13) > Created attachment 6813 > VTEs geometry comparance > > VTEs theoretical and practical geometry comparance > > xterm geometry is 100% correct. > > xfce4-terminal geometry: > - specified as 20x10 characters i.e. columns x rows > - realized as 31x9 characters i.e. columns x rows > - presented as 32x11 characters i.e. columns x rows Looks like you are using this patch, right? gtk_window_set_geometry_hints (GTK_WINDOW (window), + +#if GTK_CHECK_VERSION (3, 19, 5) + NULL, +#else screen->terminal, +#endif &hints, GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE As I've said, it makes geometry setting inaccurate, and the geometry shown is also inaccurate. Please check --geometry parameter on a clean git version - it's working very precisely for me, at least under X (not so sure about wayland).
(In reply to Igor from comment #14) > (In reply to poma from comment #13) > > Created attachment 6813 > > VTEs geometry comparance > > > > VTEs theoretical and practical geometry comparance > > > > xterm geometry is 100% correct. > > > > xfce4-terminal geometry: > > - specified as 20x10 characters i.e. columns x rows > > - realized as 31x9 characters i.e. columns x rows > > - presented as 32x11 characters i.e. columns x rows > > Looks like you are using this patch, right? > True > gtk_window_set_geometry_hints (GTK_WINDOW (window), > + > +#if GTK_CHECK_VERSION (3, 19, 5) > + NULL, > +#else > screen->terminal, > +#endif > &hints, > GDK_HINT_RESIZE_INC > | GDK_HINT_MIN_SIZE > > As I've said, it makes geometry setting inaccurate, and the geometry shown > is also inaccurate. > True > Please check --geometry parameter on a clean git version - it's working very > precisely for me, at least under X (not so sure about wayland). False :) Without "Resize info test" patch: 31x10 is not really 20x10
Created attachment 6815 VTEs geometry comparance 2 VTEs theoretical and practical geometry comparance 2 All geometries are incorrect. xfce4-terminal geometry: - specified as 20x10 characters i.e. columns x rows - realized as 31x10 characters i.e. columns x rows gnome/mate-terminal geometry: - specified as 20x10 characters i.e. columns x rows - realized as 33x10 characters i.e. columns x rows
Of course, testing is done within Xorg/xfce4-session.
(In reply to poma from comment #17) > Of course, testing is done within Xorg/xfce4-session. That's strange, I'm not seeing anything like this neither on Arch with Cinnamon, nor on Debian with Xfce and nor on Fedora with Gnome. What is your system? But, I'm seeing something similar on Fedora under wayland. Please try the following patch - does it resolve the issue for you? Seems to work for wayland. Thanks. https://github.com/f2404/xfce4-terminal3/commit/6320c5b6c50ddca5c70d2555b8daf415b856cae1
Created attachment 6817 xfce4-terminal3 geometry test xfce4-terminal3 geometry: - specified as 20x10 characters i.e. columns x rows - realized as 31x10 characters i.e. columns x rows
(In reply to poma from comment #19) > Created attachment 6817 > xfce4-terminal3 geometry test > > xfce4-terminal3 geometry: > - specified as 20x10 characters i.e. columns x rows > - realized as 31x10 characters i.e. columns x rows Please try sizes bigger than 31 columns - the menubar won't allow to show a smaller window. This is something that I've learned just now. And please also disregard the patch from comment 18 - it's wrong. Do you have any issues with the git version when specifying geometry bigger than say 35 columns?
Created attachment 6819 xfce4-terminal geometry test 2 (min. 31 columns) xfce4-terminal geometry: - specified as 31x10 characters i.e. columns x rows - realized as 31x10 characters i.e. columns x rows
(In reply to poma from comment #21) > Created attachment 6819 > xfce4-terminal geometry test 2 (min. 31 columns) > > xfce4-terminal geometry: > - specified as 31x10 characters i.e. columns x rows > - realized as 31x10 characters i.e. columns x rows Great! Please confirm you have no geometry issues with columns number >= 31.
(In reply to Igor from comment #22) > (In reply to poma from comment #21) > > Created attachment 6819 > > xfce4-terminal geometry test 2 (min. 31 columns) > > > > xfce4-terminal geometry: > > - specified as 31x10 characters i.e. columns x rows > > - realized as 31x10 characters i.e. columns x rows > > Great! > Please confirm you have no geometry issues with columns number >= 31. Specified min. amount of columns to achieve geometric accuracy is also dependent on both - DPI and Font Size values, therefore it is variable. Pro tempore, min. 31 columns is for: DPI=120 and Font Size=12 It is never easy ;)
(In reply to poma from comment #23) > (In reply to Igor from comment #22) > > (In reply to poma from comment #21) > > > Created attachment 6819 > > > xfce4-terminal geometry test 2 (min. 31 columns) > > > > > > xfce4-terminal geometry: > > > - specified as 31x10 characters i.e. columns x rows > > > - realized as 31x10 characters i.e. columns x rows > > > > Great! > > Please confirm you have no geometry issues with columns number >= 31. > > Specified min. amount of columns to achieve geometric accuracy is also > dependent on both - DPI and Font Size values, therefore it is variable. > > Pro tempore, min. 31 columns is for: DPI=120 and Font Size=12 > > It is never easy ;) Yes I know :) You can the menubar though - this would allow to shrink the window up to a few chars in width.
disable the menubar, I mean.
Created attachment 6820 VTEs geometry comparance - COLS20 (--hide-menubar) OK - xterm geometry is 100% correct - xfce4-terminal geometry is 120% correct (--hide-menubar)
The necessary minimum amount of columns, and the font sizes, to achieve geometric accuracy, with the menubar ENABLED DPI F.SIZE M.COLS 120 12 31 9 32 6 36 96 12 30 9 37 * 6 39 72 12 37 9 44 6 44 F.SIZE = Font Size: Terminal Font (Monospace) & Default UI Font (Sans) M.COLS = minimal amount of columns
Fixed by https://git.xfce.org/apps/xfce4-terminal/commit/?id=980003baf92afed64c7958dbaf1a92c3aca402cb
Thanks!
(In reply to poma from comment #29) > Thanks! You're welcome!
(In reply to Igor from comment #28) > Fixed by > https://git.xfce.org/apps/xfce4-terminal/commit/ > ?id=980003baf92afed64c7958dbaf1a92c3aca402cb Tested with xfce4-terminal-0.8.1 (with Gtk 3.18 and Vte 0.42.4) it's broken. Default size is not enabled.
(In reply to duchateau.olivier from comment #31) > (In reply to Igor from comment #28) > > Fixed by > > https://git.xfce.org/apps/xfce4-terminal/commit/ > > ?id=980003baf92afed64c7958dbaf1a92c3aca402cb > > Tested with xfce4-terminal-0.8.1 (with Gtk 3.18 and Vte 0.42.4) it's broken. > > Default size is not enabled. Sorry - looks like I should have added a check for Gtk version, like this one: https://github.com/GNOME/vte/blob/master/src/vtegtk.cc#L3230 Would you like me to release 0.8.2 with the fix?
(In reply to Igor from comment #32) > (In reply to duchateau.olivier from comment #31) > > (In reply to Igor from comment #28) > > > Fixed by > > > https://git.xfce.org/apps/xfce4-terminal/commit/ > > > ?id=980003baf92afed64c7958dbaf1a92c3aca402cb > > > > Tested with xfce4-terminal-0.8.1 (with Gtk 3.18 and Vte 0.42.4) it's broken. > > > > Default size is not enabled. > > Sorry - looks like I should have added a check for Gtk version, like this > one: https://github.com/GNOME/vte/blob/master/src/vtegtk.cc#L3230 > > Would you like me to release 0.8.2 with the fix? Not necessary, currently I removed your changes for FreeBSD users, but I can apply your fix (build package is not yet started).
Olivier, please take this patch: https://git.xfce.org/apps/xfce4-terminal/commit/?id=d8bd5f116ba05d7a6067f621f04c9a5e51de5fe8 Sorry for inconvenience.
(In reply to Igor from comment #34) > Olivier, please take this patch: > https://git.xfce.org/apps/xfce4-terminal/commit/ > ?id=d8bd5f116ba05d7a6067f621f04c9a5e51de5fe8 > Sorry for inconvenience. It's ok, thanks!