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 631797 - Use new GTK+ 3 facilities to fix resizing
Use new GTK+ 3 facilities to fix resizing
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on: 68668 631709 631796 631903
Blocks: 631799
 
 
Reported: 2010-10-10 02:54 UTC by Owen Taylor
Modified: 2010-10-11 19:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use new GTK+ 3 facilities to fix resizing (5.80 KB, patch)
2010-10-10 02:54 UTC, Owen Taylor
needs-work Details | Review
Use new GTK+ 3 facilities to fix resizing (4.09 KB, patch)
2010-10-11 17:59 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2010-10-10 02:54:32 UTC
The old sizing hacks don't work at all with GTK+ 3 because GTK+
no longer deals with underallocation (allocation smaller than the
minimum size) gracefully. However, GTK+ 3 has now been fixed to
the geometry widget feature of gtk_window_set_geometry_hints() work
without hacks.

* Make TerminalScreen override the fake minimum size that VteTerminal
  reports with more real minimum size of 0x0. This will be OK for
  GTK+ 2 because we override the size request as part of our hacks.

* For GTK+ 3, use the new gtk_window_resize_to_geometry() function
  to replace the hacks we were doing to determine the minimum size.
  (The same hacks also did a dual purpose of making GTK+'s
  computation for the geometry widget work correctly.)
Comment 1 Owen Taylor 2010-10-10 02:54:35 UTC
Created attachment 172034 [details] [review]
Use new GTK+ 3 facilities to fix resizing
Comment 2 Owen Taylor 2010-10-10 02:56:32 UTC
Depends on GTK+ patches to fix geometry widget handling and on my previous patch to fix geometry for GTK+ 2.
Comment 3 Christian Persch 2010-10-11 13:18:03 UTC
Review of attachment 172034 [details] [review]:

::: configure.ac
@@ +89,3 @@
+CFLAGS=$saved_CFLAGS
+LIBS=$saved_LIBS
+

This isn't necessary. Just use #if GTK_CHECK_VERSION (2, 91, something) in the code.

::: src/terminal-screen.c
@@ +316,2 @@
 static void
+terminal_screen_size_request (GtkWidget      *widget,

This doesn't look right.

a) This is for gtk3 only, so needs to be #if GTK_CHECK_VERSION (2, 91, something)'d.

b) If it's a VteTerminal issue, it should be fixed in vte, not worked around in g-t.
Comment 4 Owen Taylor 2010-10-11 17:54:10 UTC
(In reply to comment #3)
> Review of attachment 172034 [details] [review]:
> 
> ::: configure.ac
> @@ +89,3 @@
> +CFLAGS=$saved_CFLAGS
> +LIBS=$saved_LIBS
> +
> 
> This isn't necessary. Just use #if GTK_CHECK_VERSION (2, 91, something) in the
> code.

If you are OK with it compile-failing between now and the release of 2.91.1. Can't really bump the GTK+ version to get a <something> just for this.

> ::: src/terminal-screen.c
> @@ +316,2 @@
>  static void
> +terminal_screen_size_request (GtkWidget      *widget,
> 
> This doesn't look right.
> 
> a) This is for gtk3 only, so needs to be #if GTK_CHECK_VERSION (2, 91,
> something)'d.

It harmless for GTK+ 2.0 as well as explained in the commentary, but:

> b) If it's a VteTerminal issue, it should be fixed in vte, not worked around in
> g-t.

OK, was trying to avoid complexity and wasn't sure how actively stuff was being reviewed for VTE, but I've removed this portion and filed a VTE patch as bug 631903
Comment 5 Owen Taylor 2010-10-11 17:59:48 UTC
Created attachment 172121 [details] [review]
Use new GTK+ 3 facilities to fix resizing

With requested fixes
Comment 6 Christian Persch 2010-10-11 18:45:30 UTC
Comment on attachment 172121 [details] [review]
Use new GTK+ 3 facilities to fix resizing

+#if GTK_CHECK_VERSION (2, 91, 0)

2.91.1, not 2.91.0, since the gtk+ change is only on master.

The commit message still references the removed part about the TerminalScreen:size-request change that's now moved to the vte bug.

With these fixed, ok to commit. Thanks!
Comment 7 Christian Persch 2010-10-11 18:47:08 UTC
Oh, and please also should bump the vte req to 0.27.1 for the dependency on the fix in bug 631903.
Comment 8 Owen Taylor 2010-10-11 19:32:51 UTC
(In reply to comment #7)
> Oh, and please also should bump the vte req to 0.27.1 for the dependency on the
> fix in bug 631903.

Do you want this only for the gtk3 build or for both builds?
Comment 9 Christian Persch 2010-10-11 19:37:08 UTC
It's fine to just bump the common vte req for both.
Comment 10 Owen Taylor 2010-10-11 19:54:09 UTC
Comment on attachment 172121 [details] [review]
Use new GTK+ 3 facilities to fix resizing

Pushed with version bumps