From e161c791f649afe33c2bd02dda42c71685ff9996 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 3 Nov 2009 17:13:59 +0000 Subject: updated for version 7.2-283 --- src/gui_gtk_x11.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/gui_gtk_x11.c') diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index ad6fc25e1d..de8f265ec7 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -5267,8 +5267,24 @@ 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_mch_maximized()) + { + int w, h; + + /* Update lines and columns in accordance with the new font, keep the + * window maximized. */ + 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; } -- cgit v1.2.3