Changeset 1391 for trunk/src/user32/pmwindow.cpp
- Timestamp:
- Oct 21, 1999, 2:19:29 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r1387 r1391 1 /* $Id: pmwindow.cpp,v 1.3 8 1999-10-20 22:35:53sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.39 1999-10-21 12:19:27 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 253 253 WINDOWPOS wp; 254 254 ULONG parentHeight = 0; 255 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE ;255 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE, hwndAfter; 256 256 257 257 dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 258 258 259 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; 260 if(!win32wnd->CanReceiveSizeMsgs()) break; 259 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) goto RunDefWndProc;; 260 261 //SvL: TODO: Workaround. Why is this happening? 262 // When this flag is set the coordinates are 0, even though SWP_SIZE & SWP_MOVE are set. 263 // if ((pswp->fl & SWP_NOADJUST)) goto RunDefWndProc; 264 265 if(!win32wnd->CanReceiveSizeMsgs()) goto RunDefWndProc;; 261 266 262 267 WinQueryWindowPos(hwnd, &swpOld); … … 267 272 hParent = win32wnd->getParent()->getOS2WindowHandle(); 268 273 } 269 else break; 270 } 271 } 274 else goto RunDefWndProc;; 275 } 276 } 277 hwndAfter = pswp->hwndInsertBehind; 272 278 hFrame = win32wnd->getOS2FrameWindowHandle(); 273 279 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hFrame); … … 285 291 OSLibMapWINDOWPOStoSWP(&wp, pswp, &swpOld, hParent, hFrame); 286 292 dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 287 //TODO: What should we return here? 0 means no changes, but the AWP flags 288 // aren't very useful either 293 pswp->fl |= SWP_NOADJUST; 294 pswp->hwndInsertBehind = hwndAfter; 295 pswp->hwnd = hFrame; 296 297 WinSetMultWindowPos(GetThreadHAB(), pswp, 1); 298 return (MRESULT)0; 289 299 } 290 300 break; … … 301 311 LONG xDelta = pswp->cx - swpOld.cx; 302 312 303 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));313 dprintf(("OS2: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 304 314 305 315 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; … … 314 324 } 315 325 } 316 hFrame = WinQueryWindow(hwnd, QW_PARENT); 317 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hFrame); 326 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hwnd); 318 327 319 328 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); … … 388 397 } 389 398 390 case WM_MOVE:391 {392 if (!win32wnd->isFrameWindow()) break;393 394 HWND hFrame = win32wnd->getOS2FrameWindowHandle();395 SWP swp, swpo;396 WINDOWPOS wp;397 ULONG parentHeight = 0;398 RECTL rcl;399 400 WinQueryWindowRect (hwnd, &rcl);401 WinMapWindowPoints (hwnd, hFrame, (PPOINTL)&rcl, 2);402 swp.x = swpo.x = rcl.xLeft;403 swp.y = swpo.y = rcl.yBottom;404 swp.cx = swpo.cx = rcl.xRight - rcl.xLeft;405 swp.cy = swpo.cy = rcl.yTop - rcl.yBottom;406 swp.fl = SWP_MOVE | SWP_NOREDRAW;407 swp.hwnd = hwnd;408 swp.hwndInsertBehind = NULLHANDLE;409 dprintf(("OS2: WM_MOVE %x %x (%d,%d) (%d,%d)", hwnd, swp.fl, swp.x, swp.y, swp.cx, swp.cy));410 411 OSLibMapSWPtoWINDOWPOS(&swp, &wp, &swpo, NULLHANDLE, hFrame);412 413 wp.flags &= ~SWP_NOMOVE_W;414 wp.hwnd = win32wnd->getWindowHandle();415 win32wnd->setWindowRect(wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);416 win32wnd->setClientRect(swpo.x, swpo.y, swpo.x + swpo.cx, swpo.y + swpo.cy);417 win32wnd->MsgPosChanged((LPARAM)&wp);418 break;419 }420 421 399 case WM_SIZE: 422 400 { 423 break; 401 dprintf(("OS2: WM_SIZE (%d,%d) (%d,%d)", SHORT1FROMMP(mp2), SHORT2FROMMP(mp2), SHORT1FROMMP(mp1), SHORT2FROMMP(mp2))); 402 break; 403 } 404 405 case WM_OWNERPOSCHANGE: 406 { 407 dprintf(("OS2: WM_OWNERPOSCHANGE")); 408 goto RunDefWndProc; 409 } 410 411 case WM_CALCVALIDRECTS: 412 { 413 dprintf(("OS2: WM_CALCVALIDRECTS")); 414 goto RunDefWndProc; 424 415 } 425 416 … … 820 811 win32wnd->setEraseBkgnd (!erased, !erased); 821 812 } 822 823 813 break; 824 814 } … … 853 843 case WM_SYSCOLORCHANGE: 854 844 case WM_SYSVALUECHANGED: 855 case WM_CALCVALIDRECTS:856 845 case WM_SETSELECTION: 857 846 case WM_PPAINT:
Note:
See TracChangeset
for help on using the changeset viewer.