updated for version 7.0c01
diff --git a/src/gui_w32.c b/src/gui_w32.c
index b25f50d..7a01d98 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -456,7 +456,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;
@@ -706,6 +706,29 @@
 	HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGED, _OnWindowPosChanged);
 #endif
 
+#ifdef FEAT_GUI_TABLINE
+	case WM_RBUTTONUP:
+	{
+	    if (gui_mch_showing_tabline())
+	    {
+		POINT pt;
+		RECT rect;
+
+		/*
+		 * If the cursor is on the tabline, display the tab menu
+		 */
+		GetCursorPos((LPPOINT)&pt);
+		GetWindowRect(s_textArea, &rect);
+		if (pt.y < rect.top)
+		{
+		    show_tabline_popup_menu();
+		    return 0;
+		}
+	    }
+	    return MyWindowProc(hwnd, uMsg, wParam, lParam);
+	}
+#endif
+
     case WM_QUERYENDSESSION:	/* System wants to go down. */
 	gui_shell_closed();	/* Will exit when no changed buffers. */
 	return FALSE;		/* Do NOT allow system to go down. */
@@ -797,6 +820,12 @@
 				  && ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
 		    send_tabline_event(TabCtrl_GetCurSel(s_tabhwnd) + 1);
 		break;
+
+	    case NM_RCLICK:
+		if (gui_mch_showing_tabline()
+			&& ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
+		    show_tabline_popup_menu();
+		break;
 # endif
 	    default:
 # ifdef FEAT_GUI_TABLINE
@@ -1375,7 +1404,8 @@
 /*ARGSUSED*/
     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;
@@ -1413,16 +1443,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;
 
     /* When the taskbar is placed on the left or top of the screen,