GNOME Bugzilla – Bug 631797
Use new GTK+ 3 facilities to fix resizing
Last modified: 2010-10-11 19:54:17 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.)
Created attachment 172034 [details] [review] Use new GTK+ 3 facilities to fix resizing
Depends on GTK+ patches to fix geometry widget handling and on my previous patch to fix geometry for GTK+ 2.
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.
(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
Created attachment 172121 [details] [review] Use new GTK+ 3 facilities to fix resizing With requested fixes
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!
Oh, and please also should bump the vte req to 0.27.1 for the dependency on the fix in bug 631903.
(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?
It's fine to just bump the common vte req for both.
Comment on attachment 172121 [details] [review] Use new GTK+ 3 facilities to fix resizing Pushed with version bumps