]> granicus.if.org Git - vim/commitdiff
updated for version 7.4b.001 v7.4b.001
authorBram Moolenaar <Bram@vim.org>
Thu, 1 Aug 2013 11:20:42 +0000 (13:20 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 1 Aug 2013 11:20:42 +0000 (13:20 +0200)
Problem:    Win32: dialog may extend off-screen.
Solution:   Reduce the size, use correct borders. (Andrei Olsen)

src/gui_w32.c
src/version.c

index c59308324a1d14f6e29cb5d3386b79234fd1114b..1ec5c1d64bd1b9268b2454e492ec6b62d97d91f4 100644 (file)
@@ -3179,12 +3179,14 @@ gui_mch_dialog(
        maxDialogWidth = workarea_rect.right - workarea_rect.left - 100;
        if (maxDialogWidth > 600)
            maxDialogWidth = 600;
-       maxDialogHeight = workarea_rect.bottom - workarea_rect.top - 100;
+       /* Leave some room for the taskbar. */
+       maxDialogHeight = workarea_rect.bottom - workarea_rect.top - 150;
     }
     else
     {
-       /* Use our own window for the size, unless it's very small. */
-       GetWindowRect(s_hwnd, &rect);
+       /* Use our own window's client area for the size, unless it's very
+        * small. */
+       GetClientRect(s_hwnd, &rect);
        maxDialogWidth = rect.right - rect.left
                                   - (GetSystemMetrics(SM_CXFRAME) +
                                       GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
@@ -3192,8 +3194,8 @@ gui_mch_dialog(
            maxDialogWidth = DLG_MIN_MAX_WIDTH;
 
        maxDialogHeight = rect.bottom - rect.top
-                                  - (GetSystemMetrics(SM_CXFRAME) +
-                                      GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+                                  - (GetSystemMetrics(SM_CYFRAME) +
+                                      GetSystemMetrics(SM_CXPADDEDBORDER)) * 4;
        if (maxDialogHeight < DLG_MIN_MAX_HEIGHT)
            maxDialogHeight = DLG_MIN_MAX_HEIGHT;
     }
index f063557653d41aa8fcb749441ab32ab597e8f0ad..8eccd3cf08d8b0aa55cd7dc1e4595a1c9087cc92 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1,
 /**/
     0
 };