diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-27 20:55:21 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-27 20:55:21 +0000 |
commit | 2e2a2815e5c8274bf2e2d9b383707f1c2eee08bb (patch) | |
tree | b049ea434838eb8545fa0a0c77d4283ee355a06b /src/gui_w16.c | |
parent | 3991dab8e0a3815bd5349c1ffa88476819971c48 (diff) |
updated for version 7.0c01
Diffstat (limited to 'src/gui_w16.c')
-rw-r--r-- | src/gui_w16.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui_w16.c b/src/gui_w16.c index b8e8ca9495..75726c805b 100644 --- a/src/gui_w16.c +++ b/src/gui_w16.c @@ -128,7 +128,7 @@ gui_mswin_get_menu_height( if (fix_window && menu_height != old_menu_height) { old_menu_height = menu_height; - gui_set_shellsize(FALSE, FALSE); + gui_set_shellsize(FALSE, FALSE, RESIZE_VERT); } return menu_height; @@ -488,7 +488,8 @@ gui_mch_init(void) */ void gui_mch_set_shellsize(int width, int height, - int min_width, int min_height, int base_width, int base_height) + int min_width, int min_height, int base_width, int base_height, + int direction) { RECT workarea_rect; int win_width, win_height; @@ -528,16 +529,17 @@ gui_mch_set_shellsize(int width, int height, ; /* if the window is going off the screen, move it on to the screen */ - if (win_xpos + win_width > workarea_rect.right) + if ((direction & RESIZE_HOR) && win_xpos + win_width > workarea_rect.right) win_xpos = workarea_rect.right - win_width; - if (win_xpos < workarea_rect.left) + if ((direction & RESIZE_HOR) && win_xpos < workarea_rect.left) win_xpos = workarea_rect.left; - if (win_ypos + win_height > workarea_rect.bottom) + if ((direction & RESIZE_VERT) + && win_ypos + win_height > workarea_rect.bottom) win_ypos = workarea_rect.bottom - win_height; - if (win_ypos < workarea_rect.top) + if ((direction & RESIZE_VERT) && win_ypos < workarea_rect.top) win_ypos = workarea_rect.top; /* set window position */ |