]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.279 v7.3.279
authorBram Moolenaar <Bram@vim.org>
Wed, 10 Aug 2011 15:44:45 +0000 (17:44 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 10 Aug 2011 15:44:45 +0000 (17:44 +0200)
Problem:    With GTK, when gvim is full-screen and a tab is opened and using a
            specific monitor configuration the window is too big.
Solution:   Adjust the window size like on MS-Windows. (Yukihiro Nakadaira)

src/gui.c
src/gui_gtk_x11.c
src/proto/gui_gtk_x11.pro
src/version.c

index d7024a82f5b0572161a210ca0a953394e36ec4fe..a4e2bfe971d6d63a97bc9d0b11bfc7ccb7128fdc 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -1407,7 +1407,7 @@ gui_set_shellsize(mustset, fit_to_display, direction)
     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())
index 9d95f1a48bb4f1a91cb5278e1ecfaf1f4466e6e5..e2f9fc5be04bc4c825364bf0910d80227facebd2 100644 (file)
@@ -3899,6 +3899,21 @@ gui_mch_unmaximize()
        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.
  */
@@ -4409,14 +4424,9 @@ gui_mch_init_font(char_u *font_name, int fontset UNUSED)
 
     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
     {
index 2484082b79d4a3e36df35835a4e9cc8c1a1b559e..e395a0cfe6ba3c1b1efdcd38d41561d80ec5422f 100644 (file)
@@ -20,6 +20,7 @@ int gui_mch_get_winpos __ARGS((int *x, int *y));
 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));
index e009b8575ec3e6762710cf16cdb8bd52ae39a9ed..8ef4fac0bb22371f92cff0d86eb6513bc8da0719 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    279,
 /**/
     278,
 /**/