- Timestamp:
- Feb 27, 2004, 3:38:03 PM (21 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r10431 r10485 1 /* $Id: pmwindow.cpp,v 1.22 7 2004-01-30 22:10:26 birdExp $ */1 /* $Id: pmwindow.cpp,v 1.228 2004-02-27 14:38:03 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 705 705 dprintf(("OS2: WM_SIZE (%d,%d) (%d,%d)", SHORT1FROMMP(mp2), SHORT2FROMMP(mp2), SHORT1FROMMP(mp1), SHORT2FROMMP(mp1))); 706 706 win32wnd->SetPMUpdateRegionChanged(TRUE); 707 707 708 goto RunDefWndProc; 708 709 } … … 725 726 //This can result is visible distortions on the screen. 726 727 //Debugging showed that querying the visible region of a DC will cure 727 //this problem (GPI probably recalculates the visible region). 728 //this problem (GPI probably recalculates the visible region). (#334) 729 728 730 int nrdcs = 0; 729 731 HDC hdcWindow[MAX_OPENDCS]; … … 736 738 for(int i=0;i<nrdcs;i++) { 737 739 dprintf(("Recalc visible region of DC %x for window %x", hdcWindow[i], win32wnd->getWindowHandle())); 740 738 741 hrgnRect = GreCreateRectRegion(hdcWindow[i], &rcl, 1); 739 742 GreCopyClipRegion(hdcWindow[i], hrgnRect, 0, COPYCRGN_VISRGN); … … 741 744 } 742 745 } 743 744 746 //Workaround END 745 747 … … 2382 2384 //****************************************************************************** 2383 2385 //****************************************************************************** 2386 void RecalcVisibleRegion(Win32BaseWindow *win32wnd) 2387 { 2388 //Workaround for PM/GPI bug when moving/sizing a window with open DCs 2389 // 2390 //Windows applictions often get a DC and keep it open for the duration 2391 //of the application. When the DC's window is moved (full window dragging on) 2392 //PM/GPI doesn't seem to update the DC properly/in time. 2393 //This can result is visible distortions on the screen. 2394 2395 //We need to reset our DC (transformation & y-inversion) (#945) 2396 //Debugging showed that querying the visible region of a DC will cure 2397 //this problem (GPI probably recalculates the visible region). (#334) 2398 2399 int nrdcs = 0; 2400 HDC hdcWindow[MAX_OPENDCS]; 2401 2402 if(win32wnd->queryOpenDCs(hdcWindow, MAX_OPENDCS, &nrdcs)) 2403 { 2404 for(int i=0;i<nrdcs;i++) 2405 { 2406 dprintf(("Recalc visible region of DC %x for window %x", hdcWindow[i], win32wnd->getWindowHandle())); 2407 2408 pDCData pHps = (pDCData)GpiQueryDCData (hdcWindow[i]); 2409 2410 if(pHps) setPageXForm (win32wnd, pHps); 2411 else DebugInt3(); 2412 } 2413 } 2414 //Workaround END 2415 } 2416 //****************************************************************************** 2417 //****************************************************************************** 2384 2418 static char *PMDragExtractFiles(PDRAGINFO pDragInfo, ULONG *pcItems, ULONG *pulBytes) 2385 2419 { … … 2627 2661 } 2628 2662 #endif 2663 -
trunk/src/user32/pmwindow.h
r10285 r10485 1 /* $Id: pmwindow.h,v 1.2 1 2003-10-22 12:43:14sandervl Exp $ */1 /* $Id: pmwindow.h,v 1.22 2004-02-27 14:38:03 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 47 47 VOID FrameTrackFrame(Win32BaseWindow *win32wnd,DWORD flags); 48 48 void Frame_SysCommandSizeMove(Win32BaseWindow *win32wnd, WPARAM wParam); 49 void RecalcVisibleRegion(Win32BaseWindow *win32wnd); 49 50 #endif 50 51 -
trunk/src/user32/win32wbase.cpp
r10406 r10485 1 /* $Id: win32wbase.cpp,v 1.38 5 2004-01-19 12:39:02sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.386 2004-02-27 14:38:03 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2662 2662 InvalidateRect(getWindowHandle(), NULL, TRUE); 2663 2663 } 2664 2665 if(!(fuFlags & SWP_NOSIZE)) 2666 { 2667 // We must call this function or open DC will get out of sync 2668 // (PM will not always send us a WM_VRNENABLED message) 2669 RecalcVisibleRegion(this); 2670 } 2664 2671 return (rc); 2665 2672 }
Note:
See TracChangeset
for help on using the changeset viewer.