0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

updated for version 7.0c01

This commit is contained in:
Bram Moolenaar
2006-03-27 20:58:26 +00:00
parent 2e2a2815e5
commit afa24990b3
4 changed files with 48 additions and 15 deletions

View File

@@ -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,