Index: trunk/src/user32/dc.cpp
===================================================================
--- trunk/src/user32/dc.cpp	(revision 5189)
+++ trunk/src/user32/dc.cpp	(revision 5191)
@@ -1,3 +1,3 @@
-/* $Id: dc.cpp,v 1.89 2001-02-19 10:15:49 sandervl Exp $ */
+/* $Id: dc.cpp,v 1.90 2001-02-19 13:13:00 sandervl Exp $ */
 
 /*
@@ -219,4 +219,43 @@
    double yScale =  pHps->viewportYExt / (double)pHps->windowExt.cy;
 
+#if 0
+   mlf.fxM11 = FLOAT_TO_FIXED(1.0);
+   mlf.fxM12 = 0;
+   mlf.lM13  = 0;
+   mlf.fxM21 = 0;
+   mlf.fxM22 = FLOAT_TO_FIXED(1.0);
+   mlf.lM23  = 0;
+   mlf.lM31  = pHps->viewportOrg.x - (LONG)(pHps->windowOrg.x * xScale);
+   mlf.lM32  = pHps->viewportOrg.y - (LONG)(pHps->windowOrg.y * yScale);
+   mlf.lM33  = 1;
+
+//testestest
+   if(wnd && wnd->getWindowWidth() && wnd->getWindowHeight()) {
+       RECTL recttmp, rectviewold;
+
+       rc = GpiQueryPageViewport(pHps->hps, &rectviewold);
+       if(rc == 0) {
+           dprintf(("WARNING: GpiQueryPageViewport returned FALSE!!"));
+       }
+       recttmp.xLeft   = 0;
+//       recttmp.xRight  = ((double)wnd->getWindowWidth() / xScale);
+       recttmp.xRight  = ((double)GetScreenWidth() / xScale);
+       recttmp.yBottom = 0;
+//       recttmp.yTop    = ((double)wnd->getWindowHeight() / yScale);
+       recttmp.yTop    = ((double)GetScreenHeight() / yScale);
+
+       if(recttmp.yTop != rectviewold.yTop || 
+          recttmp.xRight != rectviewold.xRight)
+       {
+           dprintf(("GpiSetPageViewport %x (%d,%d) %f %f", pHps->hps, recttmp.xRight, recttmp.yTop, xScale, yScale));
+           rc = GpiSetPageViewport(pHps->hps, &recttmp);
+           if(rc == 0) {
+              dprintf(("WARNING: GpiSetPageViewport returned FALSE!!"));
+           }
+       }
+   }
+//testestest
+
+#else
    mlf.fxM11 = FLOAT_TO_FIXED(xScale);
    mlf.fxM12 = 0;
@@ -228,4 +267,5 @@
    mlf.lM32  = pHps->viewportOrg.y - (LONG)(pHps->windowOrg.y * yScale);
    mlf.lM33  = 1;
+#endif
 
    pHps->isLeftLeft = mlf.fxM11 >= 0;
@@ -251,5 +291,7 @@
 //      (pHps->pMetaFileObject && pHps->pMetaFileObject->isEnhanced()))
       rc = GpiSetDefaultViewMatrix(pHps->hps, 8, &mlf, TRANSFORM_REPLACE);
-
+   if(rc == 0) {
+      dprintf(("WARNING: GpiSetDefaultViewMatrix returned FALSE!!"));
+   }
 #ifdef INVERT
    if (bEnableYInversion)
@@ -400,5 +442,5 @@
         dprintf2(("WARNING: selectClientArea %x; already selected! origin (%d,%d) original origin (%d,%d)", window->getWindowHandle(), rcltemp.xLeft, rcltemp.yBottom, pHps->ptlOrigin.x, pHps->ptlOrigin.y));
         GetWindowRect(window->getWindowHandle(), &rectWindow);
-        mapWin32ToOS2Rect(OSLibGetScreenHeight(), &rectWindow, (PRECTLOS2)&rectWindowOS2);
+        mapWin32ToOS2Rect(GetScreenHeight(), &rectWindow, (PRECTLOS2)&rectWindowOS2);
         if(rectWindowOS2.xLeft + rcl.xLeft != rcltemp.xLeft ||
            rectWindowOS2.yBottom + rcl.yBottom != rcltemp.yBottom)
@@ -438,5 +480,5 @@
         rectWindow.bottom  = rectWindow.top + pClient->bottom;
         rectWindow.top    += pClient->top;
-        mapWin32ToOS2Rect(OSLibGetScreenHeight(), &rectWindow, (PRECTLOS2)&rectWindowOS2);
+        mapWin32ToOS2Rect(GetScreenHeight(), &rectWindow, (PRECTLOS2)&rectWindowOS2);
 
         hrgnParentClip = GreCreateRectRegion(pHps->hps, &rectWindowOS2, 1);
@@ -476,4 +518,7 @@
    GpiQueryPageViewport(pHps->hps, &rectWindowOS2);
    dprintf2(("page viewport (%d,%d)(%d,%d)", rectWindowOS2.xLeft, rectWindowOS2.yBottom, rectWindowOS2.xRight, rectWindowOS2.yTop));
+
+   GpiQueryBoundaryData(pHps->hps, &rectWindowOS2);
+   dprintf2(("boundary data (%d,%d)(%d,%d)", rectWindowOS2.xLeft, rectWindowOS2.yBottom, rectWindowOS2.xRight, rectWindowOS2.yTop));
 
    GpiQueryGraphicsField(pHps->hps, &rectWindowOS2);
Index: trunk/src/user32/oslibwin.cpp
===================================================================
--- trunk/src/user32/oslibwin.cpp	(revision 5189)
+++ trunk/src/user32/oslibwin.cpp	(revision 5191)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.cpp,v 1.86 2001-02-03 18:52:02 sandervl Exp $ */
+/* $Id: oslibwin.cpp,v 1.87 2001-02-19 13:13:02 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -804,4 +804,10 @@
 //******************************************************************************
 //******************************************************************************
+BOOL OSLibWinLockWindowUpdate(HWND hwnd)
+{
+  return WinLockWindowUpdate(HWND_DESKTOP, (HWND)hwnd);
+}
+//******************************************************************************
+//******************************************************************************
 ULONG OSLibGetScreenHeight()
 {
@@ -816,8 +822,2 @@
 //******************************************************************************
 //******************************************************************************
-BOOL OSLibWinLockWindowUpdate(HWND hwnd)
-{
-  return WinLockWindowUpdate(HWND_DESKTOP, (HWND)hwnd);
-}
-//******************************************************************************
-//******************************************************************************
Index: trunk/src/user32/oslibwin.h
===================================================================
--- trunk/src/user32/oslibwin.h	(revision 5189)
+++ trunk/src/user32/oslibwin.h	(revision 5191)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.h,v 1.48 2000-11-04 16:28:26 sandervl Exp $ */
+/* $Id: oslibwin.h,v 1.49 2001-02-19 13:13:04 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -292,4 +292,14 @@
 BOOL   OSLibWinChangeTaskList(HANDLE hTaskList, HWND hwndFrame, char *title, BOOL fVisible);
 
+inline ULONG GetScreenHeight()
+{
+  return ScreenHeight;
+}
+
+inline ULONG GetScreenWidth()
+{
+  return ScreenWidth;
+}
+
 ULONG OSLibGetScreenHeight();
 ULONG OSLibGetScreenWidth();
