- Timestamp:
- Jan 20, 2000, 5:48:58 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/menu.cpp
r2479 r2483 1 /* $Id: menu.cpp,v 1.1 1 2000-01-19 01:40:56 sandervlExp $*/1 /* $Id: menu.cpp,v 1.12 2000-01-20 16:48:54 cbratschi Exp $*/ 2 2 /* 3 3 * Menu functions … … 2581 2581 } 2582 2582 2583 VOID MENU_DispatchMouseMsg(MSG *msg) 2584 { 2585 LONG hittest; 2586 2587 hittest = SendMessageA(msg->hwnd,WM_NCHITTEST,0,MAKELONG(msg->pt.x,msg->pt.y)); 2588 if (hittest != HTCLIENT) 2589 SendMessageA(msg->hwnd,msg->message+WM_NCMOUSEMOVE-WM_MOUSEMOVE,hittest,MAKELONG(msg->pt.x,msg->pt.y)); 2590 else 2591 DispatchMessageA(msg); 2592 } 2593 2583 2594 /*********************************************************************** 2584 2595 * MENU_TrackMenu … … 2638 2649 2639 2650 hmenu = MENU_PtMenu(mt.hTopMenu,pt,inMenuBar); 2651 2652 //CB: todo: Win32 dispatches at least some mouse messages! 2640 2653 2641 2654 switch(msg.message) … … 2681 2694 2682 2695 fEndMenu |= !MENU_MouseMove( &mt, hmenu, wFlags ); 2696 //CB: dispatch message 2697 if (!fEndMenu && !hmenu) DispatchMessageA(&msg); 2683 2698 2684 2699 } /* switch(msg.message) - mouse */ … … 2853 2868 if (IsMenu(hMenu)) 2854 2869 { 2855 if (ht == HTCAPTION) wFlags |= TPM_CAPTIONSYSMENU ;2870 if (ht == HTCAPTION) wFlags |= TPM_CAPTIONSYSMENU | TPM_RIGHTBUTTON; 2856 2871 if (IsIconic(hWnd)) wFlags |= TPM_BOTTOMALIGN; //CB: todo: for minimized windows 2857 2872 -
trunk/src/user32/oslibmsgtranslate.cpp
r2469 r2483 1 /* $Id: oslibmsgtranslate.cpp,v 1.1 5 2000-01-18 20:10:40 sandervlExp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.16 2000-01-20 16:48:55 cbratschi Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 208 208 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y); 209 209 210 if (IsNCMouseMsg(win32wnd)) 210 if (IsNCMouseMsg(win32wnd)) 211 211 { 212 212 winMsg->message = WINWM_NCMOUSEMOVE; 213 213 winMsg->wParam = (WPARAM)hittest; 214 214 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 215 } 215 } 216 216 else 217 217 { … … 234 234 winMsg->message = WINWM_NCACTIVATE; 235 235 winMsg->wParam = SHORT1FROMMP(os2Msg->mp1); 236 236 return TRUE; 237 237 } 238 238 case WM_WINDOWPOSCHANGED: 239 239 { 240 241 240 //todo: proper translation 241 return FALSE; 242 242 } 243 243 } … … 324 324 325 325 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 326 dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy)); 327 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 328 329 thdb->wp.hwnd = win32wnd->getWindowHandle(); 330 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) 331 { 332 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind); 333 if(wndAfter) 334 thdb->wp.hwndInsertAfter = wndAfter->getWindowHandle(); 335 } 336 337 PRECT lpRect = win32wnd->getWindowRect(); 338 //SvL: Only send it when the client has changed & the frame hasn't 339 // If the frame size/position has changed, pmframe.cpp will send 340 // this message 341 if(lpRect->right == thdb->wp.x+thdb->wp.cx && lpRect->bottom == thdb->wp.y+thdb->wp.cy) { 342 winMsg->message = WINWM_WINDOWPOSCHANGED; 343 winMsg->lParam = (LPARAM)&thdb->wp; 344 break; 345 } 346 346 } 347 347 goto dummymessage; … … 447 447 winMsg->wParam = (WPARAM)hittest; 448 448 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 449 } 449 } 450 450 else 451 451 { … … 672 672 673 673 case WM_CONTEXTMENU: 674 winMsg->message = WINWM_CONTEXTMENU; 675 winMsg->wParam = win32wnd->getWindowHandle(); 676 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 677 break; 678 674 679 case WM_INITMENU: 675 680 case WM_MENUSELECT: -
trunk/src/user32/oslibwin.cpp
r2469 r2483 1 /* $Id: oslibwin.cpp,v 1.6 1 2000-01-18 20:10:43 sandervlExp $ */1 /* $Id: oslibwin.cpp,v 1.62 2000-01-20 16:48:55 cbratschi Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 612 612 point.x = x; 613 613 point.y = y; 614 if(hParent) 614 615 if (hParent) 615 616 { 616 WinMapWindowPoints(hParent, HWND_DESKTOP, &point, 1); 617 } 618 point.y = ScreenHeight-point.y-cy; 617 RECTL parentRect; 618 619 WinQueryWindowRect(hParent,&parentRect); 620 point.y = parentRect.yTop-point.y-cy; 621 } else point.y = ScreenHeight-point.y-cy; 619 622 620 623 x = point.x; -
trunk/src/user32/pmframe.cpp
r2469 r2483 1 /* $Id: pmframe.cpp,v 1.3 7 2000-01-18 20:10:43 sandervlExp $ */1 /* $Id: pmframe.cpp,v 1.38 2000-01-20 16:48:55 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 139 139 } 140 140 141 case WM_QUERYTRACKINFO: 142 { 143 //CB: todo: use minmaxinfo 144 goto RunDefFrameProc; 145 } 146 141 147 case WM_QUERYBORDERSIZE: 142 148 { … … 290 296 } 291 297 } 298 292 299 OSLibMapSWPtoWINDOWPOSFrame(pswp, &wp, &swpOld, hParent, hwnd); 293 300 -
trunk/src/user32/pmwindow.cpp
r2469 r2483 1 /* $Id: pmwindow.cpp,v 1.7 8 2000-01-18 20:10:43 sandervlExp $ */1 /* $Id: pmwindow.cpp,v 1.79 2000-01-20 16:48:56 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 253 253 case WM_WINDOWPOSCHANGED: 254 254 { 255 256 255 if(pWinMsg->message != 0) 256 win32wnd->MsgPosChanged((LPARAM)&thdb->wp); 257 257 goto RunDefWndProc; 258 258 } -
trunk/src/user32/win32wbase.cpp
r2469 r2483 1 /* $Id: win32wbase.cpp,v 1.14 2 2000-01-18 20:10:53 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.143 2000-01-20 16:48:56 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1055 1055 //set new window rectangle 1056 1056 setWindowRect(lpWndPos->x, lpWndPos->y, lpWndPos->x + lpWndPos->cx, lpWndPos->y + lpWndPos->cy); 1057 if (getParent()) mapWin32Rect(getParent()->getOS2WindowHandle(),OSLIB_HWND_DESKTOP,&rectWindow); 1057 1058 newWindowRect= rectWindow; 1058 1059 } … … 1413 1414 DWORD lParam; 1414 1415 1415 if(getParent()) {//in parent coordinates 1416 POINT point; 1417 1418 point.x = rectClient.left; 1419 point.y = rectClient.top; 1420 ClientToScreen(getParent()->getWindowHandle(),&point); 1421 1422 lParam = MAKELONG(point.x, point.y); 1423 } 1424 else {//in screen coordinates 1425 lParam = MAKELONG(rectClient.left,rectClient.top); 1416 if (dwStyle & WS_CHILD) 1417 { 1418 lParam = MAKELONG(rectClient.left,rectClient.top); 1419 } else 1420 { 1421 POINT point; 1422 1423 point.x = rectClient.left; 1424 point.y = rectClient.top; 1425 if (getParent()) ClientToScreen(getParent()->getWindowHandle(),&point); 1426 1427 lParam = MAKELONG(point.x, point.y); 1426 1428 } 1427 1429 SendInternalMessageA(WM_MOVE, 0, lParam); … … 2046 2048 HWND hParent = 0; 2047 2049 2048 dprintf (("SetWindowPos %x %x (%d,%d)(%d,%d) %x", Win32Hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags));2049 2050 2050 if (fuFlags & 2051 2051 ~(SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | … … 2064 2064 WINDOWPOS wpos; 2065 2065 SWP swp, swpOld; 2066 2067 #if 0 //CB: test: MSIE 2.0 displays the tool-/addressbar this way -> to check 2068 //CB: cx or cy are 0 2069 if (cx == 0) cx = 50; 2070 if (cy == 0) cy = 50; 2071 #endif 2066 2072 2067 2073 wpos.flags = fuFlags; -
trunk/src/user32/win32wbasenonclient.cpp
r2469 r2483 1 /* $Id: win32wbasenonclient.cpp,v 1. 3 2000-01-18 20:10:55 sandervlExp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.4 2000-01-20 16:48:57 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 1222 1222 SetActiveWindow(); 1223 1223 1224 if (( GetActiveWindow() == Win32Hwnd) && (dwStyle & WS_SYSMENU))1224 if (((GetActiveWindow() == Win32Hwnd) || isMDIChild()) && (dwStyle & WS_SYSMENU)) 1225 1225 { 1226 1226 SendInternalMessageA(WM_SYSCOMMAND,SC_MOUSEMENU+HTCAPTION,lParam); -
trunk/src/user32/window.cpp
r2469 r2483 1 /* $Id: window.cpp,v 1. 49 2000-01-18 20:11:08 sandervlExp $ */1 /* $Id: window.cpp,v 1.50 2000-01-20 16:48:58 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 640 640 { 641 641 Win32BaseWindow *window; 642 BOOL rc;643 642 644 643 window = Win32BaseWindow::GetWindowFromHandle(hwnd); … … 646 645 dprintf(("GetWindowRect, window %x not found", hwnd)); 647 646 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 648 return 0;647 return FALSE; 649 648 } 650 649 if(pRect == NULL) { 651 650 SetLastError(ERROR_INVALID_PARAMETER); 652 return 0;651 return FALSE; 653 652 } 654 653 *pRect = *window->getWindowRect(); 655 654 dprintf(("GetWindowRect %x (%d,%d) (%d,%d)", hwnd, pRect->left, pRect->top, pRect->right, pRect->bottom)); 656 return rc;655 return TRUE; 657 656 } 658 657 //****************************************************************************** … … 767 766 BOOL WIN32API GetClientRect( HWND hwnd, PRECT pRect) 768 767 { 769 BOOL rc;770 768 HWND hwndWin32 = hwnd; 771 772 769 Win32BaseWindow *window; 773 770
Note:
See TracChangeset
for help on using the changeset viewer.