- Timestamp:
- Jan 14, 2000, 2:16:59 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibmsgtranslate.cpp
r2426 r2435 1 /* $Id: oslibmsgtranslate.cpp,v 1.1 3 2000-01-13 13:54:52sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.14 2000-01-14 13:16:57 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 236 236 return TRUE; 237 237 } 238 case WM_WINDOWPOSCHANGED: 239 { 240 //todo: proper translation 241 return FALSE; 242 } 238 243 } 239 244 //do normal translation for all other messages … … 318 323 if (!win32wnd->CanReceiveSizeMsgs()) goto dummymessage; 319 324 320 dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy));321 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);322 323 thdb->wp.hwnd = win32wnd->getWindowHandle(); 324 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))325 {326 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind);327 if(wndAfter) 328 thdb->wp.hwndInsertAfter = wndAfter->getWindowHandle(); 329 }330 331 PRECT lpRect = win32wnd->getWindowRect(); 332 //SvL: Only send it when the client has changed & the frame hasn't333 // If the frame size/position has changed, pmframe.cpp will send334 // this message335 if(lpRect->right == thdb->wp.x+thdb->wp.cx && lpRect->bottom == thdb->wp.y+thdb->wp.cy) {336 winMsg->message = WINWM_WINDOWPOSCHANGED;337 winMsg->lParam = (LPARAM)&thdb->wp;338 } 339 else { 340 //// win32wnd->setWindowRect(thdb->wp.x, thdb->wp.y, thdb->wp.x+thdb->wp.cx, thdb->wp.y+thdb->wp.cy); 341 goto dummymessage;342 }325 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 326 dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy)); 327 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 328 329 thdb->wp.hwnd = win32wnd->getWindowHandle(); 330 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) 331 { 332 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind); 333 if(wndAfter) 334 thdb->wp.hwndInsertAfter = wndAfter->getWindowHandle(); 335 } 336 337 PRECT lpRect = win32wnd->getWindowRect(); 338 //SvL: Only send it when the client has changed & the frame hasn't 339 // If the frame size/position has changed, pmframe.cpp will send 340 // this message 341 if(lpRect->right == thdb->wp.x+thdb->wp.cx && lpRect->bottom == thdb->wp.y+thdb->wp.cy) { 342 winMsg->message = WINWM_WINDOWPOSCHANGED; 343 winMsg->lParam = (LPARAM)&thdb->wp; 344 break; 345 } 346 } 347 goto dummymessage; 343 348 } 344 349 -
trunk/src/user32/new/pmframe.cpp
r2433 r2435 1 /* $Id: pmframe.cpp,v 1.1 6 2000-01-13 20:11:37 sandervl Exp $ */1 /* $Id: pmframe.cpp,v 1.17 2000-01-14 13:16:57 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 287 287 288 288 //CB: todo: use result for WM_CALCVALIDRECTS 289 // mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),hwnd,win32wnd->getClientRectPtr(),(PRECTLOS2)&rect);290 289 mapWin32ToOS2Rect(win32wnd->getOS2FrameWindowHandle(), win32wnd->getClientRectPtr(), (PRECTLOS2)&rect); 291 290 … … 378 377 } 379 378 379 case WM_ERASEBACKGROUND: 380 break; 381 380 382 case WM_CALCVALIDRECTS: 381 383 { … … 447 449 VOID FrameUpdateClient(Win32BaseWindow *win32wnd) 448 450 { 451 RECT rectOld, rectNew; 449 452 RECTL rect; 450 453 SWP swpClient = {0}; 451 454 455 rectOld = *win32wnd->getClientRectPtr(); 452 456 win32wnd->MsgFormatFrame(NULL); 457 rectNew = *win32wnd->getClientRectPtr(); 458 if(WinEqualRect(0, (PRECTL)&rectOld, (PRECTL)&rectNew) == 1) { 459 WinInvalidateRect(win32wnd->getOS2FrameWindowHandle(), NULL, FALSE); 460 return; 461 } 453 462 //CB: todo: use result for WM_CALCVALIDRECTS 454 // mapWin32ToOS2Rect(WinQueryWindow(win32wnd->getOS2FrameWindowHandle(),QW_PARENT),win32wnd->getOS2FrameWindowHandle(),win32wnd->getClientRectPtr(),(PRECTLOS2)&rect);455 463 mapWin32ToOS2Rect(win32wnd->getOS2FrameWindowHandle(), win32wnd->getClientRectPtr(), (PRECTLOS2)&rect); 456 464 -
trunk/src/user32/new/pmwindow.cpp
r2426 r2435 1 /* $Id: pmwindow.cpp,v 1.4 0 2000-01-13 13:54:52sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.41 2000-01-14 13:16:57 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 253 253 case WM_WINDOWPOSCHANGED: 254 254 { 255 win32wnd->MsgPosChanged((LPARAM)&thdb->wp); 255 if(pWinMsg->message != 0) 256 win32wnd->MsgPosChanged((LPARAM)&thdb->wp); 256 257 goto RunDefWndProc; 257 258 } -
trunk/src/user32/new/win32wbase.cpp
r2433 r2435 1 /* $Id: win32wbase.cpp,v 1. 39 2000-01-13 20:11:37sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.40 2000-01-14 13:16:58 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1082 1082 RECT oldWindowRect = rectWindow, client = rectClient, newWindowRect; 1083 1083 WINDOWPOS wndPos; 1084 ULONG rc; 1084 1085 1085 1086 if(lpWndPos) { 1086 1087 //set new window rectangle 1087 1088 setWindowRect(lpWndPos->x, lpWndPos->y, lpWndPos->x + lpWndPos->cx, lpWndPos->y + lpWndPos->cy); 1088 newWindowRect 1089 newWindowRect= rectWindow; 1089 1090 } 1090 1091 else { 1091 wndPos.hwnd = Win32Hwnd;1092 wndPos.hwnd = getWindowHandle(); 1092 1093 wndPos.hwndInsertAfter = 0; 1093 1094 newWindowRect= rectWindow; … … 1098 1099 wndPos.cy = newWindowRect.bottom - newWindowRect.top; 1099 1100 wndPos.flags = SWP_FRAMECHANGED; 1100 lpWndPos = &wndPos; 1101 } 1102 1103 return SendNCCalcSize(TRUE, &oldWindowRect, &newWindowRect, &client, &wndPos, &rectClient); 1101 lpWndPos = &wndPos; 1102 } 1103 1104 rc = SendNCCalcSize(TRUE, &newWindowRect, &oldWindowRect, &client, lpWndPos, &rectClient); 1105 1106 dprintf(("MsgFormatFrame: old client rect (%d,%d)(%d,%d), new client (%d,%d)(%d,%d)", client.left, client.top, client.right, client.bottom, rectClient.left, rectClient.top, rectClient.right, rectClient.bottom)); 1107 return rc; 1104 1108 } 1105 1109 //****************************************************************************** -
trunk/src/user32/new/win32wbasenonclient.cpp
r2433 r2435 1 /* $Id: win32wbasenonclient.cpp,v 1. 5 2000-01-13 20:11:39sandervl Exp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.6 2000-01-14 13:16:58 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 234 234 { 235 235 case HTCAPTION: 236 SetActiveWindow(); 236 if (GetActiveWindow() != Win32Hwnd) 237 SetActiveWindow(); 238 237 239 if (GetActiveWindow() == Win32Hwnd) 238 240 SendInternalMessageA(WM_SYSCOMMAND,SC_MOVE+HTCAPTION,lParam); … … 353 355 LONG Win32BaseWindow::HandleNCCalcSize(BOOL calcValidRects,RECT *winRect) 354 356 { 355 RECT tmpRect = { 0, 0, 0, 0 } ,*clientRect;356 LONG result = WVR_ALIGNTOP | WVR_ALIGNLEFT;357 RECT tmpRect = { 0, 0, 0, 0 }; 358 LONG result = 0; 357 359 UINT style; 358 360 … … 364 366 if (style & CS_HREDRAW) result |= WVR_HREDRAW; 365 367 366 clientRect = &((NCCALCSIZE_PARAMS*)winRect)->rgrc[2];367 *clientRect = rectWindow;368 #if 1369 OffsetRect(clientRect, -clientRect->left, -clientRect->top);370 #else371 if(getParent()) {//in parent coordinates372 OffsetRect(clientRect, -clientRect->left, -clientRect->top);373 MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), (POINT *)clientRect, 2);374 }375 //else in screen coordinates (already in screen coordinates)376 #endif377 378 368 if(!(dwStyle & WS_MINIMIZE)) 379 369 { 380 370 AdjustRectOuter(&tmpRect,FALSE); 381 371 382 clientRect->left -= tmpRect.left;383 clientRect->top -= tmpRect.top;384 clientRect->right -= tmpRect.right;385 clientRect->bottom -= tmpRect.bottom;372 winRect->left -= tmpRect.left; 373 winRect->top -= tmpRect.top; 374 winRect->right -= tmpRect.right; 375 winRect->bottom -= tmpRect.bottom; 386 376 387 377 if (HAS_MENU()) 388 378 { 389 clientRect->top +=379 winRect->top += 390 380 MENU_GetMenuBarHeight(Win32Hwnd, 391 392 381 winRect->right - winRect->left, 382 -tmpRect.left, -tmpRect.top ) + 1; 393 383 } 394 384 395 385 SetRect (&tmpRect, 0, 0, 0, 0); 396 386 AdjustRectInner(&tmpRect); 397 clientRect->left -= tmpRect.left;398 clientRect->top -= tmpRect.top;399 clientRect->right -= tmpRect.right;400 clientRect->bottom -= tmpRect.bottom;387 winRect->left -= tmpRect.left; 388 winRect->top -= tmpRect.top; 389 winRect->right -= tmpRect.right; 390 winRect->bottom -= tmpRect.bottom; 401 391 } 402 392 -
trunk/src/user32/new/win32wbasepos.cpp
r2433 r2435 1 /* $Id: win32wbasepos.cpp,v 1. 6 2000-01-13 20:11:39 sandervl Exp $ */1 /* $Id: win32wbasepos.cpp,v 1.7 2000-01-14 13:16:59 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 134 134 winposCopy = *winpos; 135 135 params.rgrc[1] = *oldWindowRect; 136 #if 0137 136 if(getParent()) {//in parent coordinates 138 137 MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), (POINT *)oldClientRect, 2); … … 141 140 OffsetRect(oldClientRect, rectWindow.left, rectWindow.top); 142 141 } 143 #endif144 142 params.rgrc[2] = *oldClientRect; 145 143 params.lppos = &winposCopy; 146 144 } 147 145 result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, (LPARAM)¶ms ); 148 if (calcValidRect) 146 147 /* If the application send back garbage, ignore it */ 148 if (params.rgrc[0].left <= params.rgrc[0].right && params.rgrc[0].top <= params.rgrc[0].bottom) 149 149 { 150 /* If the application send back garbage, ignore it */ 151 if (params.rgrc[2].left <= params.rgrc[2].right && params.rgrc[2].top <= params.rgrc[2].bottom) 152 { 153 *newClientRect = params.rgrc[2]; 154 #if 0 155 if(getParent()) {//in parent coordinates 156 MapWindowPoints(getParent()->getWindowHandle(), getWindowHandle(), (POINT *)newClientRect, 2); 157 } 158 else {//in screen coordinates (just add window rectangle origin (already in screen coordinates)) 159 OffsetRect(newClientRect, -rectWindow.left, -rectWindow.top); 160 } 161 #endif 162 } 163 else 164 SetRectEmpty(newClientRect); 150 *newClientRect = params.rgrc[0]; 151 //client rectangle now in screen coordinates; convert to 'frame' coordinates 152 OffsetRect(newClientRect, -rectWindow.left, -rectWindow.top); 165 153 } 166 154 -
trunk/src/user32/new/win32wmdichild.cpp
r2426 r2435 1 /* $Id: win32wmdichild.cpp,v 1. 8 2000-01-13 13:54:55sandervl Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.9 2000-01-14 13:16:59 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 534 534 RECT rect; 535 535 536 getClientRect(&rect);536 client->getClientRect(&rect); 537 537 if(client->getParent() == NULL) { 538 538 dprintf(("Win32MDIChildWindow::childGetMinMaxInfo:: client parent == NULL!!"));
Note:
See TracChangeset
for help on using the changeset viewer.