- Timestamp:
- Apr 15, 2000, 5:11:14 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r3306 r3388 1 /* $Id: oslibmsgtranslate.cpp,v 1.2 7 2000-04-02 15:11:50 cbratschiExp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.28 2000-04-15 15:11:13 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 138 138 POSTMSG_PACKET *packet; 139 139 THDB *thdb = (THDB *)pThdb; 140 BOOL fWasDisabled = FALSE; 140 141 int i; 141 142 … … 169 170 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 170 171 172 if(!win32wnd->IsWindowEnabled()) { 173 if(win32wnd->getParent()) { 174 winMsg->hwnd = win32wnd->getParent()->getWindowHandle(); 175 } 176 else goto dummymessage; //don't send mouse messages to disabled windows 177 } 171 178 return TRUE; 172 179 … … 182 189 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 183 190 191 //if a window is disabled, it's parent receives the mouse messages 192 if(!win32wnd->IsWindowEnabled()) { 193 if(win32wnd->getParent()) { 194 win32wnd = win32wnd->getParent(); 195 } 196 fWasDisabled = TRUE; 197 } 198 184 199 if (IsNCMouseMsg(win32wnd)) { 185 200 winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN); … … 203 218 } 204 219 } 205 220 if(fWasDisabled) { 221 if(win32wnd) { 222 winMsg->hwnd = win32wnd->getWindowHandle(); 223 } 224 else goto dummymessage; //don't send mouse messages to disabled windows 225 } 206 226 return TRUE; 207 227 … … 221 241 //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window 222 242 243 //if a window is disabled, it's parent receives the mouse messages 244 if(!win32wnd->IsWindowEnabled()) { 245 if(win32wnd->getParent()) { 246 win32wnd = win32wnd->getParent(); 247 } 248 fWasDisabled = TRUE; 249 } 223 250 if (IsNCMouseMsg(win32wnd)) 224 251 { … … 239 266 } 240 267 } 268 if(fWasDisabled) { 269 if(win32wnd) { 270 winMsg->hwnd = win32wnd->getWindowHandle(); 271 } 272 else goto dummymessage; //don't send mouse messages to disabled windows 273 } 241 274 //OS/2 Window coordinates -> Win32 Window coordinates 242 275 return TRUE; … … 429 462 winMsg->wParam = 0; 430 463 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 464 if(!win32wnd->IsWindowEnabled()) { 465 if(win32wnd->getParent()) { 466 winMsg->hwnd = win32wnd->getParent()->getWindowHandle(); 467 } 468 else goto dummymessage; //don't send mouse messages to disabled windows 469 } 431 470 break; 432 471 … … 442 481 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 443 482 483 //if a window is disabled, it's parent receives the mouse messages 484 if(!win32wnd->IsWindowEnabled()) { 485 if(win32wnd->getParent()) { 486 win32wnd = win32wnd->getParent(); 487 } 488 fWasDisabled = TRUE; 489 } 490 444 491 if(IsNCMouseMsg(win32wnd)) { 445 492 winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN); … … 464 511 } 465 512 513 if(fWasDisabled) { 514 if(win32wnd) { 515 winMsg->hwnd = win32wnd->getWindowHandle(); 516 } 517 else goto dummymessage; //don't send mouse messages to disabled windows 518 } 466 519 break; 467 520 … … 481 534 //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window 482 535 536 //if a window is disabled, it's parent receives the mouse messages 537 if(!win32wnd->IsWindowEnabled()) { 538 if(win32wnd->getParent()) { 539 win32wnd = win32wnd->getParent(); 540 } 541 fWasDisabled = TRUE; 542 } 483 543 if(IsNCMouseMsg(win32wnd)) 484 544 { … … 499 559 } 500 560 } 561 if(fWasDisabled) { 562 if(win32wnd) { 563 winMsg->hwnd = win32wnd->getWindowHandle(); 564 } 565 else goto dummymessage; //don't send mouse messages to disabled windows 566 } 501 567 //OS/2 Window coordinates -> Win32 Window coordinates 502 568 break; -
trunk/src/user32/pmframe.cpp
r3366 r3388 1 /* $Id: pmframe.cpp,v 1.5 0 2000-04-10 19:43:15sandervl Exp $ */1 /* $Id: pmframe.cpp,v 1.51 2000-04-15 15:11:13 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 168 168 case WM_HITTEST: 169 169 { 170 if (win32wnd->IsWindowCreated()) 170 if(win32wnd->getWindowHandle() != pWinMsg->hwnd) { 171 win32wnd = Win32BaseWindow::GetWindowFromHandle(pWinMsg->hwnd); 172 } 173 if(win32wnd && win32wnd->IsWindowCreated()) 171 174 { 172 175 MRESULT rc; … … 189 192 case WM_BUTTON3DBLCLK: 190 193 { 191 if (win32wnd->IsWindowCreated()) 194 if(win32wnd->getWindowHandle() != pWinMsg->hwnd) { 195 win32wnd = Win32BaseWindow::GetWindowFromHandle(pWinMsg->hwnd); 196 } 197 if(win32wnd && win32wnd->IsWindowCreated()) 192 198 { 193 199 win32wnd->MsgButton(pWinMsg); … … 211 217 case WM_MOUSEMOVE: 212 218 { 213 //OS/2 Window coordinates -> Win32 Window coordinates 214 if (win32wnd->IsWindowCreated()) 215 win32wnd->MsgMouseMove(pWinMsg); 219 if(win32wnd->getWindowHandle() != pWinMsg->hwnd) { 220 win32wnd = Win32BaseWindow::GetWindowFromHandle(pWinMsg->hwnd); 221 } 222 if(win32wnd && win32wnd->IsWindowCreated()) 223 win32wnd->MsgMouseMove(pWinMsg); 216 224 RestoreOS2TIB(); 217 225 return (MRESULT)TRUE; -
trunk/src/user32/pmwindow.cpp
r3284 r3388 1 /* $Id: pmwindow.cpp,v 1.8 8 2000-03-31 14:42:48 cbratschiExp $ */1 /* $Id: pmwindow.cpp,v 1.89 2000-04-15 15:11:13 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 338 338 //************************************************************************** 339 339 case WM_HITTEST: 340 rc = win32wnd->MsgHitTest(pWinMsg); 340 if(win32wnd->getWindowHandle() != pWinMsg->hwnd) { 341 win32wnd = Win32BaseWindow::GetWindowFromHandle(pWinMsg->hwnd); 342 } 343 if(win32wnd) 344 rc = win32wnd->MsgHitTest(pWinMsg); 341 345 break; 342 346 … … 351 355 case WM_BUTTON3UP: 352 356 case WM_BUTTON3DBLCLK: 353 win32wnd->MsgButton(pWinMsg); 357 if(win32wnd->getWindowHandle() != pWinMsg->hwnd) { 358 win32wnd = Win32BaseWindow::GetWindowFromHandle(pWinMsg->hwnd); 359 } 360 if(win32wnd) 361 win32wnd->MsgButton(pWinMsg); 354 362 rc = TRUE; 355 363 break; … … 369 377 case WM_MOUSEMOVE: 370 378 { 371 //OS/2 Window coordinates -> Win32 Window coordinates 372 win32wnd->MsgMouseMove(pWinMsg); 379 if(win32wnd->getWindowHandle() != pWinMsg->hwnd) { 380 win32wnd = Win32BaseWindow::GetWindowFromHandle(pWinMsg->hwnd); 381 } 382 if(win32wnd) 383 win32wnd->MsgMouseMove(pWinMsg); 373 384 break; 374 385 } -
trunk/src/user32/win32wbase.cpp
r3365 r3388 1 /* $Id: win32wbase.cpp,v 1.17 8 2000-04-10 19:40:45sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.179 2000-04-15 15:11:14 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2598 2598 BOOL Win32BaseWindow::EnableWindow(BOOL fEnable) 2599 2599 { 2600 return OSLibWinEnableWindow(OS2HwndFrame, fEnable); 2600 BOOL rc; 2601 2602 //return true if previous state was disabled, else false (sdk docs) 2603 rc = (getStyle() & WS_DISABLED) != 0; 2604 if(rc && !fEnable) { 2605 SendMessageA(WM_CANCELMODE, 0, 0); 2606 } 2607 OSLibWinEnableWindow(OS2HwndFrame, fEnable); 2608 return rc; 2601 2609 } 2602 2610 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.