- Timestamp:
- Oct 24, 2001, 5:41:54 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/menu.cpp
r7079 r7195 1 /* $Id: menu.cpp,v 1.3 8 2001-10-16 14:49:45sandervl Exp $*/1 /* $Id: menu.cpp,v 1.39 2001-10-24 15:41:53 sandervl Exp $*/ 2 2 /* 3 3 * Menu functions … … 35 35 #include "pmwindow.h" 36 36 #include "win32wmisc.h" 37 #include "oslibmsg.h" 37 38 38 39 #define DBG_LOCALLOG DBG_menu … … 2827 2828 } 2828 2829 2829 //EVENT_Capture( mt.hOwnerWnd, HTMENU ); //CB: todo 2830 #ifdef __WIN32OS2__ 2830 2831 //SvL: Set keyboard & mouse event capture 2831 2832 SetCapture(mt.hOwnerWnd); 2833 //SetCapture breaks system menu (double click), must generate double 2834 //clicks manually 2835 SetMenuDoubleClick(TRUE); 2836 #else 2837 EVENT_Capture( mt.hOwnerWnd, HTMENU ); 2838 #endif 2832 2839 2833 2840 while (!fEndMenu) … … 2838 2845 /* we have to keep the message in the queue until it's 2839 2846 * clear that menu loop is not over yet. */ 2840 // if (!GetMessageA(&msg,msg.hwnd,0,0)) break; 2847 #ifdef __WIN32OS2__ 2841 2848 //SvL: Getting messages for only the menu delays background paints (i.e. VPBuddy logo) 2842 2849 if (!GetMessageA(&msg,0,0,0)) break; 2850 #else 2851 if (!GetMessageA(&msg,msg.hwnd,0,0)) break; 2852 #endif 2843 2853 TranslateMessage( &msg ); 2844 2854 mt.pt = msg.pt; … … 2868 2878 if (bSysMenu && (hmenu == mt.hTopMenu)) 2869 2879 { 2880 #ifdef __WIN32OS2__ 2881 //double click on system menu -> close application 2882 PostMessageA(hwnd, WM_SYSCOMMAND,SC_CLOSE, msg.lParam); 2883 #endif 2870 2884 fEndMenu = TRUE; 2871 2885 break; … … 3062 3076 else if (msg.message == WM_SYSCOMMAND) 3063 3077 { 3064 3065 fEndMenu = TRUE;3066 break;3078 /* The user clicked on the system menu/button */ 3079 fEndMenu = TRUE; 3080 break; 3067 3081 } 3068 3082 else … … 3079 3093 else mt.trackFlags &= ~TF_SKIPREMOVE; 3080 3094 } 3081 3095 #ifdef __WIN32OS2__ 3096 SetMenuDoubleClick(FALSE); 3082 3097 ReleaseCapture(); 3098 #endif 3083 3099 3084 3100 menu = MENU_GetMenu(mt.hTopMenu); -
trunk/src/user32/oslibmsg.h
r6941 r7195 1 /* $Id: oslibmsg.h,v 1.1 5 2001-10-03 18:37:52sandervl Exp $ */1 /* $Id: oslibmsg.h,v 1.16 2001-10-24 15:41:53 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 39 39 BOOL OSLibWinReplyMessage(ULONG result); 40 40 ULONG OSLibWinQueryQueueStatus(); 41 42 void SetMenuDoubleClick(BOOL fSet); 41 43 42 44 BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode); -
trunk/src/user32/oslibmsgtranslate.cpp
r7191 r7195 1 /* $Id: oslibmsgtranslate.cpp,v 1.6 5 2001-10-24 13:18:59 phallerExp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.66 2001-10-24 15:41:54 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 161 161 }; 162 162 163 static BOOL fGenerateDoubleClick = FALSE; 164 static MSG doubleClickMsg = {0}; 165 163 166 //****************************************************************************** 164 167 //****************************************************************************** … … 185 188 { 186 189 return ((win32wnd->getLastHitTestVal() != HTCLIENT_W) && (WinQueryCapture(HWND_DESKTOP) != win32wnd->getOS2WindowHandle())); 190 } 191 //****************************************************************************** 192 //****************************************************************************** 193 void SetMenuDoubleClick(BOOL fSet) 194 { 195 fGenerateDoubleClick = fSet; 187 196 } 188 197 //****************************************************************************** … … 389 398 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 390 399 400 dprintf(("MsgButton %x (%x) %d at (%d,%d) time %x", winMsg->hwnd, os2Msg->hwnd, WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN), winMsg->pt.x, winMsg->pt.y, winMsg->time)); 401 391 402 HWND hwnd; 392 403 … … 445 456 else goto dummymessage; //don't send mouse messages to disabled windows 446 457 } 458 459 DisableLogging(); 460 if ((winMsg->message == WINWM_LBUTTONDOWN) || 461 (winMsg->message == WINWM_RBUTTONDOWN) || 462 (winMsg->message == WINWM_MBUTTONDOWN) || 463 (winMsg->message == WINWM_NCLBUTTONDOWN) || 464 (winMsg->message == WINWM_NCRBUTTONDOWN) || 465 (winMsg->message == WINWM_NCMBUTTONDOWN)) 466 { 467 if(fGenerateDoubleClick && doubleClickMsg.message == winMsg->message && 468 winMsg->time - doubleClickMsg.time < GetDoubleClickTime() && 469 (abs(winMsg->pt.x - doubleClickMsg.pt.x) < GetSystemMetrics(SM_CXDOUBLECLK_W)/2) && 470 (abs(winMsg->pt.y - doubleClickMsg.pt.y) < GetSystemMetrics(SM_CYDOUBLECLK_W)/2)) 471 { 472 dprintf(("single -> double click")); 473 if(winMsg->message >= WINWM_LBUTTONDOWN) { 474 winMsg->message += (WINWM_LBUTTONDBLCLK - WINWM_LBUTTONDOWN); 475 } 476 else winMsg->message += (WINWM_LBUTTONDBLCLK - WINWM_NCLBUTTONDOWN); 477 doubleClickMsg.message = 0; 478 } 479 else { 480 dprintf(("save for double click")); 481 doubleClickMsg = *winMsg; 482 if(doubleClickMsg.message >= WINWM_NCLBUTTONDOWN && doubleClickMsg.message <= WINWM_NCMBUTTONDOWN) { 483 doubleClickMsg.message += (WINWM_LBUTTONDOWN - WINWM_NCLBUTTONDOWN); 484 } 485 } 486 } 487 EnableLogging(); 488 447 489 break; 448 490 } -
trunk/src/user32/pmwindow.cpp
r7110 r7195 1 /* $Id: pmwindow.cpp,v 1.15 6 2001-10-18 13:28:08sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.157 2001-10-24 15:41:54 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 331 331 case WM_SHOW: 332 332 dprintf(("OS2: WM_SHOW %x %d", hwnd, mp1)); 333 //SvL: When a window is made visible, then we don't receive a334 // WM_VRNENABLED message (for some weird reason)335 win32wnd->callVisibleRgnNotifyProc(TRUE);336 333 win32wnd->MsgShow((ULONG)mp1); 337 334 break; … … 695 692 { 696 693 //WM_CREATE handled during client window creation 697 dprintf(("PMFRAME: WM_CREATE %x" ));694 dprintf(("PMFRAME: WM_CREATE %x", hwnd)); 698 695 goto RunDefFrameWndProc; 699 696 } … … 972 969 } 973 970 971 //SvL: When a window is made visible, then we don't receive a 972 // WM_VRNENABLED message (for some weird reason) 973 if(pswp->fl & SWP_SHOW) { 974 win32wnd->callVisibleRgnNotifyProc(TRUE); 975 } 976 else 977 if(pswp->fl & SWP_HIDE) { 978 win32wnd->callVisibleRgnNotifyProc(FALSE); 979 } 980 974 981 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) 975 982 { -
trunk/src/user32/win32wbase.cpp
r7183 r7195 1 /* $Id: win32wbase.cpp,v 1.29 4 2001-10-24 10:26:45sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.295 2001-10-24 15:41:54 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1080 1080 BOOL fClick = FALSE; 1081 1081 1082 // dprintf(("MsgButton at (%d,%d)", msg->pt.x, msg->pt.y));1082 dprintf(("MsgButton %d at (%d,%d)", msg->message, msg->pt.x, msg->pt.y)); 1083 1083 switch(msg->message) { 1084 1084 case WM_LBUTTONDBLCLK: … … 1088 1088 { 1089 1089 msg->message = msg->message - (WM_LBUTTONDBLCLK - WM_LBUTTONDOWN); //dblclick -> down 1090 MsgButton(msg);1091 msg->message++; //button-up1092 1090 return MsgButton(msg); 1093 1091 }
Note:
See TracChangeset
for help on using the changeset viewer.