Ignore:
Timestamp:
Apr 27, 2001, 7:36:39 PM (24 years ago)
Author:
sandervl
Message:

mouse message translation + dc reset after resize fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/dc.cpp

    r5390 r5606  
    1 /* $Id: dc.cpp,v 1.96 2001-03-27 20:47:22 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.97 2001-04-27 17:36:36 sandervl Exp $ */
    22
    33/*
     
    425425   RECTL rectWindowOS2;
    426426
    427    if(pClient->left == 0 && pClient->top == 0 &&
     427   if(!window->isOwnDCDirty() && (pClient->left == 0 && pClient->top == 0 &&
    428428      window->getClientHeight() == window->getWindowHeight() &&
    429       window->getClientWidth()  == window->getWindowWidth())
     429      window->getClientWidth()  == window->getWindowWidth()))
    430430   {
    431431        //client rectangle = frame rectangle -> no change necessary
     
    437437
    438438   mapWin32ToOS2Rect(window->getWindowHeight(), window->getClientRectPtr(), (PRECTLOS2)&rcl);
     439
     440   GetWindowRect(window->getWindowHandle(), &rectWindow);
     441   mapWin32ToOS2Rect(GetScreenHeight(), &rectWindow, (PRECTLOS2)&rectWindowOS2);
     442   dprintf2(("frame (%d,%d)(%d,%d) hps height %d", rectWindowOS2.xLeft, rectWindowOS2.yBottom, rectWindowOS2.xRight, rectWindowOS2.yTop, pHps->height));
    439443
    440444   //convert to screen coordinates
     
    510514              SETUPDC_ORIGIN | SETUPDC_VISRGN | SETUPDC_RECALCCLIP);
    511515
    512    pHps->isClientArea = TRUE;
    513 
    514516   // Destroy the region now we have finished with it.
    515517   GreDestroyRegion(pHps->hps, hrgnRect);
     518
     519   pHps->isClientArea = TRUE;
     520
     521   if(pClient->left == 0 && pClient->top == 0 &&
     522      window->getClientHeight() == window->getWindowHeight() &&
     523      window->getClientWidth()  == window->getWindowWidth())
     524   {
     525       //client = frame, so no changes are necessary when switching between the two
     526       pHps->isClient = FALSE;
     527       pHps->isClientArea = FALSE;
     528   }
     529   if(window->isOwnDCDirty()) {
     530       window->validateOwnDC();
     531       setPageXForm(window, pHps);
     532   }
    516533
    517534//testestest
     
    621638   if(wnd) {
    622639      selectClientArea(wnd, pHps);
     640   }
     641}
     642//******************************************************************************
     643//******************************************************************************
     644VOID WIN32API checkOrigin(pDCData pHps)
     645{
     646 Win32BaseWindow *wnd;
     647
     648   wnd = Win32BaseWindow::GetWindowFromOS2Handle(pHps->hwnd);
     649   if(wnd) {
     650      dprintfOrigin(pHps->hps);
     651      if(pHps->isClient)
     652          selectClientArea(wnd, pHps);
    623653   }
    624654}
     
    13051335         pr->yTop = height - pr->yBottom;
    13061336         pr->yBottom = height - temp;
    1307          dprintf2(("Invalid region (%d,%d) (%d,%d)", pr->xLeft, pr->yBottom, pr->xRight, pr->yTop));
     1337         dprintf2(("RedrawWindow: region (%d,%d) (%d,%d)", pr->xLeft, pr->yBottom, pr->xRight, pr->yTop));
    13081338      }
    13091339
Note: See TracChangeset for help on using the changeset viewer.