Your message dated Sun, 26 Jul 2009 15:34:16 +0200
with message-id <[email protected]>
has caused the   report #466088,
regarding [vim-gtk] Changing font size in a maximized window doesn't 
recalculate the usable area
to be marked as having been forwarded to the upstream software
author(s) Bram Moolenaar <[email protected]>

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
466088: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466088
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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 <[email protected]>
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


--- End Message ---

Reply via email to