if (!gui.shell_created)
return;
-#ifdef MSWIN
+#if defined(MSWIN) || defined(FEAT_GUI_GTK)
/* If not setting to a user specified size and maximized, calculate the
* number of characters that fit in the maximized window. */
if (!mustset && gui_mch_maximized())
gtk_window_unmaximize(GTK_WINDOW(gui.mainwin));
}
+/*
+ * Called when the font changed while the window is maximized. Compute the
+ * new Rows and Columns. This is like resizing the window.
+ */
+ void
+gui_mch_newfont()
+{
+ 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);
+}
+
/*
* Set the windows size.
*/
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);
+ gui_mch_newfont();
}
else
{
void gui_mch_set_winpos __ARGS((int x, int y));
int gui_mch_maximized __ARGS((void));
void gui_mch_unmaximize __ARGS((void));
+void gui_mch_newfont __ARGS((void));
void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction));
void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 279,
/**/
278,
/**/