summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-08-01 13:20:42 +0200
committerBram Moolenaar <Bram@vim.org>2013-08-01 13:20:42 +0200
commit1b1b09449fffbbfc7598101f515819407a14d920 (patch)
treecdd608a7b7422e9d78fbafa9c319ff86827a672d /src
parent1a42b4befb5307d20dc6ff4685116e085ece3b1f (diff)
downloadvim-1b1b09449fffbbfc7598101f515819407a14d920.zip
updated for version 7.4b.001
Problem: Win32: dialog may extend off-screen. Solution: Reduce the size, use correct borders. (Andrei Olsen)
Diffstat (limited to 'src')
-rw-r--r--src/gui_w32.c12
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index c59308324..1ec5c1d64 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -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;
}
diff --git a/src/version.c b/src/version.c
index f06355765..8eccd3cf0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1,
+/**/
0
};