summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui_w32.c18
-rw-r--r--src/gui_w48.c12
-rw-r--r--src/os_win32.h3
-rw-r--r--src/version.c2
4 files changed, 25 insertions, 10 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 5ec14983e..c59308324 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1694,8 +1694,10 @@ gui_mch_set_shellsize(int width, int height,
}
/* compute the size of the outside of the window */
- win_width = width + GetSystemMetrics(SM_CXFRAME) * 2;
- win_height = height + GetSystemMetrics(SM_CYFRAME) * 2
+ win_width = width + (GetSystemMetrics(SM_CXFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+ win_height = height + (GetSystemMetrics(SM_CYFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ GetSystemMetrics(SM_CYCAPTION)
#ifdef FEAT_MENU
+ gui_mswin_get_menu_height(FALSE)
@@ -2546,13 +2548,15 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
get_work_area(&workarea_rect);
*screen_w = workarea_rect.right - workarea_rect.left
- - GetSystemMetrics(SM_CXFRAME) * 2;
+ - (GetSystemMetrics(SM_CXFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
/* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
* the menubar for MSwin, we subtract it from the screen height, so that
* the window size can be made to fit on the screen. */
*screen_h = workarea_rect.bottom - workarea_rect.top
- - GetSystemMetrics(SM_CYFRAME) * 2
+ - (GetSystemMetrics(SM_CYFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
- GetSystemMetrics(SM_CYCAPTION)
#ifdef FEAT_MENU
- gui_mswin_get_menu_height(FALSE)
@@ -3182,12 +3186,14 @@ gui_mch_dialog(
/* Use our own window for the size, unless it's very small. */
GetWindowRect(s_hwnd, &rect);
maxDialogWidth = rect.right - rect.left
- - GetSystemMetrics(SM_CXFRAME) * 2;
+ - (GetSystemMetrics(SM_CXFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
if (maxDialogWidth < DLG_MIN_MAX_WIDTH)
maxDialogWidth = DLG_MIN_MAX_WIDTH;
maxDialogHeight = rect.bottom - rect.top
- - GetSystemMetrics(SM_CXFRAME) * 2;
+ - (GetSystemMetrics(SM_CXFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
if (maxDialogHeight < DLG_MIN_MAX_HEIGHT)
maxDialogHeight = DLG_MIN_MAX_HEIGHT;
}
diff --git a/src/gui_w48.c b/src/gui_w48.c
index 4458bde53..2f92414d3 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -2909,9 +2909,11 @@ gui_mswin_get_valid_dimensions(
int base_width, base_height;
base_width = gui_get_base_width()
- + GetSystemMetrics(SM_CXFRAME) * 2;
+ + (GetSystemMetrics(SM_CXFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
base_height = gui_get_base_height()
- + GetSystemMetrics(SM_CYFRAME) * 2
+ + (GetSystemMetrics(SM_CYFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ GetSystemMetrics(SM_CYCAPTION)
#ifdef FEAT_MENU
+ gui_mswin_get_menu_height(FALSE)
@@ -3274,9 +3276,11 @@ gui_mch_newfont()
GetWindowRect(s_hwnd, &rect);
gui_resize_shell(rect.right - rect.left
- - GetSystemMetrics(SM_CXFRAME) * 2,
+ - (GetSystemMetrics(SM_CXFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2,
rect.bottom - rect.top
- - GetSystemMetrics(SM_CYFRAME) * 2
+ - (GetSystemMetrics(SM_CYFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
- GetSystemMetrics(SM_CYCAPTION)
#ifdef FEAT_MENU
- gui_mswin_get_menu_height(FALSE)
diff --git a/src/os_win32.h b/src/os_win32.h
index 42cbab595..58b179ff8 100644
--- a/src/os_win32.h
+++ b/src/os_win32.h
@@ -102,6 +102,9 @@
#endif
#ifndef PROTO
# include <windows.h>
+# ifndef SM_CXPADDEDBORDER
+# define SM_CXPADDEDBORDER 92
+# endif
#endif
/*
diff --git a/src/version.c b/src/version.c
index 16faee2f9..6b724dacd 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 */
/**/
+ 38,
+/**/
37,
/**/
36,