Changeset 1971 for trunk/src/user32/pmwindow.cpp
- Timestamp:
- Dec 5, 1999, 1:31:50 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r1965 r1971 1 /* $Id: pmwindow.cpp,v 1.6 1 1999-12-04 00:04:19sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.62 1999-12-05 00:31:47 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 277 277 break; 278 278 279 #if 0 279 #if 1 280 case WM_ADJUSTWINDOWPOS: 281 { 282 PSWP pswp = (PSWP)mp1; 283 284 dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 285 goto RunDefWndProc; 286 } 287 #else 280 288 case WM_ADJUSTWINDOWPOS: 281 289 { … … 331 339 break; 332 340 } 333 341 #endif 342 343 #if 1 334 344 case WM_WINDOWPOSCHANGED: 335 345 { … … 341 351 LONG xDelta = pswp->cx - swpOld.cx; 342 352 343 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));344 345 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;353 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 354 355 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) goto RunDefWndProc; 346 356 347 357 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { … … 355 365 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, win32wnd->getOS2FrameWindowHandle()); 356 366 357 if (!win32wnd->CanReceiveSizeMsgs()) break;358 359 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);367 if (!win32wnd->CanReceiveSizeMsgs()) goto RunDefWndProc; 368 369 dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy)); 360 370 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 361 371 … … 366 376 wp.hwndInsertAfter = wndAfter->getWindowHandle(); 367 377 } 368 369 if (yDelta != 0 || xDelta != 0) 370 { 371 HENUM henum = WinBeginEnumWindows(pswp->hwnd); 372 SWP swp[10]; 373 int i = 0; 374 HWND hwnd; 375 376 while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE) 377 { 378 #if 0 379 if (mdiClient ) 380 { 381 continue; 382 } 383 #endif 384 WinQueryWindowPos(hwnd, &(swp[i])); 385 386 #ifdef DEBUG 387 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromOS2Handle(hwnd); 388 dprintf(("ENUMERATE %x delta %d (%d,%d) (%d,%d) %x", (window) ? window->getWindowHandle() : hwnd, 389 yDelta, swp[i].x, swp[i].y, swp[i].cx, swp[i].cy, swp[i].fl)); 390 #endif 391 392 if(swp[i].y != 0) { 393 //child window at offset <> 0 from client area -> offset now changes 394 swp[i].y += yDelta; 395 swp[i].fl &= ~(SWP_NOREDRAW); 396 } 397 //else child window with the same start coorindates as the client area 398 //The app should resize it. 399 400 if (i == 9) 401 { 402 WinSetMultWindowPos(GetThreadHAB(), swp, 10); 403 i = 0; 404 } 405 else 406 { 407 i++; 408 } 409 } 410 411 WinEndEnumWindows(henum); 412 413 if (i) 414 WinSetMultWindowPos(GetThreadHAB(), swp, i); 415 } 416 if (yDelta != 0) 417 { 418 POINT pt; 419 if(GetCaretPos (&pt) == TRUE) 420 { 421 pt.y -= yDelta; 422 SetCaretPos (pt.x, pt.y); 423 } 424 } 378 //SvL: Can be sent twice now (once in pmframe, once here); shouldn't really matter though... 425 379 win32wnd->MsgPosChanged((LPARAM)&wp); 426 380 … … 881 835 dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle())); 882 836 #if 1 883 837 break; 884 838 #else 885 839 … … 971 925 // dprintf(("OS2: RunDefWndProc msg %x for %x", msg, hwnd)); 972 926 RestoreOS2TIB(); 927 973 928 return WinDefWindowProc( hwnd, msg, mp1, mp2 ); 974 929 } /* End of Win32WindowProc */
Note:
See TracChangeset
for help on using the changeset viewer.