Changeset 3388 for trunk/src/user32/oslibmsgtranslate.cpp
- Timestamp:
- Apr 15, 2000, 5:11:14 PM (25 years ago)
- File:
-
- 1 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;
Note:
See TracChangeset
for help on using the changeset viewer.