Bram,

When using a maximized gvim (GTK2), changing the font size does not
cause the window to re-evaluate its size in order to stay maximized.
The attached patch, contributed by Vitaly Minko, causes the window to
correctly resize the window when the font size is changed.

Thanks
-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@debian.org>
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 33fdaed..73cde7c 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -5231,8 +5231,21 @@ gui_mch_init_font(char_u *font_name, int fontset UNUSED)
 # endif
 #endif /* !HAVE_GTK2 */
 
-    /* Preserve the logical dimensions of the screen. */
-    update_window_manager_hints(0, 0);
+#ifdef HAVE_GTK2
+    if (gui.mainwin != NULL && gdk_window_get_state(gui.mainwin->window) &
+	GDK_WINDOW_STATE_MAXIMIZED)
+    {
+	/* Update shell size in accordance with the new font */
+	int w, h;
+	gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
+	w -= get_menu_tool_width();
+	h -= get_menu_tool_height();
+	gui_resize_shell(w, h);
+    }
+    else
+#endif
+	/* Preserve the logical dimensions of the screen. */
+	update_window_manager_hints(0, 0);
 
     return OK;
 }

Attachment: signature.asc
Description: Digital signature

Reply via email to