Changeset 2418 for trunk/src/user32
- Timestamp:
- Jan 12, 2000, 4:14:16 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibmsgtranslate.cpp
r2415 r2418 1 /* $Id: oslibmsgtranslate.cpp,v 1.1 1 2000-01-12 12:40:44sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.12 2000-01-12 15:14:15 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 235 235 return TRUE; 236 236 } 237 238 237 } 239 238 //do normal translation for all other messages … … 295 294 296 295 case WM_WINDOWPOSCHANGED: 297 goto dummymessage; 296 { 297 PSWP pswp = (PSWP)os2Msg->mp1; 298 SWP swpOld = *(pswp + 1); 299 HWND hParent = NULLHANDLE; 300 LONG yDelta = pswp->cy - swpOld.cy; 301 LONG xDelta = pswp->cx - swpOld.cx; 302 303 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 304 305 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) goto dummymessage; 306 307 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 308 if (win32wnd->isChild()) { 309 if(win32wnd->getParent()) { 310 hParent = win32wnd->getParent()->getOS2WindowHandle(); 311 } 312 else goto dummymessage; //parent has just been destroyed 313 } 314 } 315 OSLibMapSWPtoWINDOWPOS(pswp, &thdb->wp, &swpOld, hParent, win32wnd->getOS2FrameWindowHandle()); 316 317 if (!win32wnd->CanReceiveSizeMsgs()) goto dummymessage; 318 319 dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy)); 320 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 321 322 thdb->wp.hwnd = win32wnd->getWindowHandle(); 323 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) 324 { 325 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind); 326 if(wndAfter) 327 thdb->wp.hwndInsertAfter = wndAfter->getWindowHandle(); 328 } 329 330 PRECT lpRect = win32wnd->getWindowRect(); 331 //SvL: Only send it when the client has changed & the frame hasn't 332 // If the frame size/position has changed, pmframe.cpp will send 333 // this message 334 if(lpRect->right == thdb->wp.x+thdb->wp.cx && lpRect->bottom == thdb->wp.y+thdb->wp.cy) { 335 winMsg->message = WINWM_WINDOWPOSCHANGED; 336 winMsg->lParam = (LPARAM)&thdb->wp; 337 } 338 else { 339 //// win32wnd->setWindowRect(thdb->wp.x, thdb->wp.y, thdb->wp.x+thdb->wp.cx, thdb->wp.y+thdb->wp.cy); 340 goto dummymessage; 341 } 342 } 298 343 299 344 case WM_ACTIVATE: -
trunk/src/user32/new/pmframe.cpp
r2415 r2418 1 /* $Id: pmframe.cpp,v 1.1 1 2000-01-12 12:40:45sandervl Exp $ */1 /* $Id: pmframe.cpp,v 1.12 2000-01-12 15:14:16 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 391 391 return WinDefWindowProc(hwnd,msg,mp1,mp2); 392 392 } 393 393 //****************************************************************************** 394 //****************************************************************************** 394 395 PVOID FrameSubclassFrameWindow(Win32BaseWindow *win32wnd) 395 396 { 396 397 return WinSubclassWindow(win32wnd->getOS2FrameWindowHandle(),PFNWP(Win32FrameProc)); 397 398 } 398 399 VOID FrameUpdateFrame(Win32BaseWindow *win32wnd,DWORD flags) 399 //****************************************************************************** 400 //****************************************************************************** 401 VOID FrameUpdateClient(Win32BaseWindow *win32wnd) 400 402 { 401 WinSendMsg(win32wnd->getOS2FrameWindowHandle(),WM_UPDATEFRAME,(MPARAM)flags,(MPARAM)0); 403 RECTL rect; 404 SWP swpClient = {0}; 405 406 win32wnd->MsgFormatFrame(); 407 //CB: todo: use result for WM_CALCVALIDRECTS 408 mapWin32ToOS2Rect(WinQueryWindow(win32wnd->getOS2FrameWindowHandle(),QW_PARENT),win32wnd->getOS2FrameWindowHandle(),win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 409 410 swpClient.hwnd = win32wnd->getOS2WindowHandle(); 411 swpClient.hwndInsertBehind = 0; 412 swpClient.x = rect.xLeft; 413 swpClient.y = rect.yBottom; 414 swpClient.cx = rect.xRight-rect.xLeft; 415 swpClient.cy = rect.yTop-rect.yBottom; 416 swpClient.fl = SWP_MOVE | SWP_SIZE; 417 WinSetMultWindowPos(GetThreadHAB(), &swpClient, 1); 402 418 } 419 //****************************************************************************** 420 //****************************************************************************** -
trunk/src/user32/new/pmframe.h
r2381 r2418 1 /* $Id: pmframe.h,v 1. 3 2000-01-09 14:14:23 cbratschiExp $ */1 /* $Id: pmframe.h,v 1.4 2000-01-12 15:14:16 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 10 10 11 11 PVOID FrameSubclassFrameWindow(Win32BaseWindow *win32wnd); 12 VOID FrameUpdate Frame(Win32BaseWindow *win32wnd,DWORD flags);12 VOID FrameUpdateClient(Win32BaseWindow *win32wnd); 13 13 14 14 #define HTERROR_W (-2) -
trunk/src/user32/new/scroll.cpp
r2381 r2418 1 /* $Id: scroll.cpp,v 1. 8 2000-01-09 14:14:23 cbratschiExp $ */1 /* $Id: scroll.cpp,v 1.9 2000-01-12 15:14:16 sandervl Exp $ */ 2 2 /* 3 3 * Scrollbar control … … 1471 1471 { 1472 1472 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 1473 BOOL fShowH = (nBar == SB_HORZ) ? 0:fShow,fShowV = (nBar == SB_VERT) ? 0:fShow; 1473 // BOOL fShowH = (nBar == SB_HORZ) ? 0:fShow,fShowV = (nBar == SB_VERT) ? 0:fShow; 1474 BOOL fShowH = (nBar == SB_HORZ) ? fShow : 0; 1475 BOOL fShowV = (nBar == SB_VERT) ? fShow : 0; 1474 1476 1475 1477 dprintf(("ShowScrollBar %04x %d %d\n", hwnd, nBar, fShow)); -
trunk/src/user32/new/win32wbase.cpp
r2415 r2418 1 /* $Id: win32wbase.cpp,v 1.3 5 2000-01-12 12:40:47sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.36 2000-01-12 15:14:16 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2028 2028 } 2029 2029 2030 if(IsWindowDestroyed()) { 2031 //changing the position of a window that's being destroyed can cause crashes in PMMERGE 2032 dprintf(("SetWindowPos; window already destroyed")); 2033 return TRUE; 2034 } 2030 2035 WINDOWPOS wpos; 2031 2036 SWP swp, swpOld; … … 2053 2058 2054 2059 OSLibMapWINDOWPOStoSWP(&wpos, &swp, &swpOld, hParent, OS2HwndFrame); 2055 if (swp.fl == 0) 2056 return TRUE; 2060 if (swp.fl == 0) { 2061 if (fuFlags & SWP_FRAMECHANGED) 2062 { 2063 FrameUpdateClient(this); 2064 } 2065 return TRUE; 2066 } 2057 2067 2058 2068 // if ((swp.fl & SWPOS_ZORDER) && (swp.hwndInsertBehind > HWNDOS_BOTTOM)) … … 2098 2108 } 2099 2109 2100 if (fuFlags == SWP_FRAMECHANGED) 2101 { 2102 //CB: optimize: if frame size has changed not necessary! 2103 FrameUpdateFrame(this,0); 2110 if(fuFlags & SWP_FRAMECHANGED && (fuFlags & (SWP_NOMOVE | SWP_NOSIZE) == (SWP_NOMOVE | SWP_NOSIZE))) 2111 { 2112 FrameUpdateClient(this); 2104 2113 } 2105 2114
Note:
See TracChangeset
for help on using the changeset viewer.