summaryrefslogtreecommitdiffstats
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-27 20:58:26 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-27 20:58:26 +0000
commitafa24990b344e199abe1391fac7181defcd0c244 (patch)
treed516436e09300951fe2497008528a7042babed8d /src/gui_w32.c
parent2e2a2815e5c8274bf2e2d9b383707f1c2eee08bb (diff)
updated for version 7.0c01
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r--src/gui_w32.c43
1 files changed, 37 insertions, 6 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index b25f50db9b..7a01d98732 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -456,7 +456,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;
@@ -706,6 +706,29 @@ _WndProc(
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 @@ _WndProc(
&& ((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 @@ get_work_area(RECT *spi_rect)
/*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 @@ 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;
/* When the taskbar is placed on the left or top of the screen,