]> granicus.if.org Git - vim/commitdiff
patch 7.4.874 v7.4.874
authorBram Moolenaar <Bram@vim.org>
Fri, 25 Sep 2015 13:00:31 +0000 (15:00 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 25 Sep 2015 13:00:31 +0000 (15:00 +0200)
Problem:    MS-Windows: When Vim runs inside another application, the size
            isn't right.
Solution:   When in child mode compute the size differently. (Agorgianitis
            Loukas)

src/gui_w48.c
src/version.c

index bff67a813103d041e0eeaee08626d1e2856cb19a..ef288e1e64963580c1380d97976c30cf52170cc1 100644 (file)
@@ -3335,17 +3335,30 @@ gui_mch_newfont()
     RECT       rect;
 
     GetWindowRect(s_hwnd, &rect);
-    gui_resize_shell(rect.right - rect.left
-                       - (GetSystemMetrics(SM_CXFRAME) +
-                          GetSystemMetrics(SM_CXPADDEDBORDER)) * 2,
-                    rect.bottom - rect.top
-                       - (GetSystemMetrics(SM_CYFRAME) +
-                          GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
-                       - GetSystemMetrics(SM_CYCAPTION)
+    if (win_socket_id == 0)
+    {
+       gui_resize_shell(rect.right - rect.left
+           - (GetSystemMetrics(SM_CXFRAME) +
+              GetSystemMetrics(SM_CXPADDEDBORDER)) * 2,
+           rect.bottom - rect.top
+           - (GetSystemMetrics(SM_CYFRAME) +
+              GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+           - GetSystemMetrics(SM_CYCAPTION)
+#ifdef FEAT_MENU
+           - gui_mswin_get_menu_height(FALSE)
+#endif
+       );
+    }
+    else
+    {
+       /* Inside another window, don't use the frame and border. */
+       gui_resize_shell(rect.right - rect.left,
+           rect.bottom - rect.top
 #ifdef FEAT_MENU
                        - gui_mswin_get_menu_height(FALSE)
 #endif
-           );
+       );
+    }
 }
 
 /*
index 9bbe042a702a6f72b203204fb79e4b77e415e59e..f8fe4a8911e3ae7a0f5d21cc1d3691704bc86378 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    874,
 /**/
     873,
 /**/