Anonymous avatar Anonymous committed 342b176

updated for version 7.3.279
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)

Comments (0)

Files changed (4)

     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())

src/gui_gtk_x11.c

 }
 
 /*
+ * 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.
  */
     void
 
     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
     {

src/proto/gui_gtk_x11.pro

 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,
 /**/
     277,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.