updated for version 7.0c01
diff --git a/src/gui_w16.c b/src/gui_w16.c
index b8e8ca9..75726c8 100644
--- a/src/gui_w16.c
+++ b/src/gui_w16.c
@@ -128,7 +128,7 @@
     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 @@
  */
     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 @@
 			;
 
     /* 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 */