Mercurial > vim
diff src/gui_w16.c @ 811:d2c169a725c8
updated for version 7.0c01
author | vimboss |
---|---|
date | Mon, 27 Mar 2006 20:55:21 +0000 |
parents | 23a639c430c5 |
children | 4d2585cf5950 |
line wrap: on
line diff
--- 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 hei ; /* 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 */