diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-09-25 15:00:31 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-09-25 15:00:31 +0200 |
commit | 8919554fe17255cddbbce6b833fab9aba19c8b88 (patch) | |
tree | da115cda2c2f69ec12cd93cfac18ee4d057cb2c3 /src/gui_w48.c | |
parent | b8603882b1679385b287f14c527fa61eee60a9dd (diff) | |
download | vim-git-8919554fe17255cddbbce6b833fab9aba19c8b88.tar.gz |
patch 7.4.874v7.4.874
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)
Diffstat (limited to 'src/gui_w48.c')
-rw-r--r-- | src/gui_w48.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/gui_w48.c b/src/gui_w48.c index bff67a813..ef288e1e6 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -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 - ); + ); + } } /* |