Ignore:
Timestamp:
May 3, 2000, 8:35:56 PM (25 years ago)
Author:
sandervl
Message:

capture changes/fixes, SetWindowPos fix

File:
1 edited

Legend:

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

    r3482 r3488  
    1 /* $Id: win32wbase.cpp,v 1.182 2000-05-02 20:50:51 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.183 2000-05-03 18:35:54 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    847847  lastHitTestVal = DispatchMessageA(msg);
    848848
    849   dprintf2(("MsgHitTest (%d,%d) (%d,%d) (%d,%d) returned %x", LOWORD(msg->lParam), HIWORD(msg->lParam), rectWindow.left, rectWindow.right, rectWindow.top, rectWindow.bottom, lastHitTestVal));
     849  dprintf2(("MsgHitTest %x (%d,%d) (%d,%d) (%d,%d) returned %x", getWindowHandle(), LOWORD(msg->lParam), HIWORD(msg->lParam), rectWindow.left, rectWindow.right, rectWindow.top, rectWindow.bottom, lastHitTestVal));
    850850
    851851  if (lastHitTestVal == HTTRANSPARENT)
     
    21522152    WINDOWPOS wpos;
    21532153    SWP swp, swpOld;
    2154 #if 0 //CB: breaks trackbar tooltip: must call SetWindowPos twice to change the size
    2155     if(fuFlags & SWP_SHOWWINDOW) {
    2156         fShow = TRUE;
    2157         fuFlags &= ~SWP_SHOWWINDOW;
    2158     }
    2159     else
    2160 #endif
    2161     if(fuFlags & SWP_HIDEWINDOW) {
    2162         fHide = TRUE;
    2163         fuFlags &= ~SWP_HIDEWINDOW;
    2164     }
    21652154    wpos.flags            = fuFlags;
    21662155    wpos.cy               = cy;
     
    21902179            FrameUpdateClient(this);
    21912180        }
    2192         if(fHide) {
    2193             ShowWindow(SW_HIDE);
    2194         }
    2195         if(fShow) {
    2196             ShowWindow(SW_SHOWNA);
     2181        if(fuFlags & SWP_SHOWWINDOW) {
     2182                setStyle(getStyle() | WS_VISIBLE);
     2183        }
     2184        else
     2185        if(fuFlags & SWP_HIDEWINDOW) {
     2186                setStyle(getStyle() & ~WS_VISIBLE);
    21972187        }
    21982188        return TRUE;
     
    22152205    dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl));
    22162206
    2217     //SvL: For some reason WinSetMultWindowPos doesn't work for showing windows when they are hidden..
    2218     if(fHide) {
    2219         ShowWindow(SW_HIDE);
     2207    if(fuFlags & SWP_SHOWWINDOW && !IsWindowVisible()) {
     2208        setStyle(getStyle() | WS_VISIBLE);
     2209    }
     2210    else
     2211    if(fuFlags & SWP_HIDEWINDOW && IsWindowVisible()) {
     2212        setStyle(getStyle() & ~WS_VISIBLE);
    22202213    }
    22212214    rc = OSLibWinSetMultWindowPos(&swp, 1);
    2222     if(fShow) {
    2223         ShowWindow(SW_SHOWNA);
    2224     }
    22252215
    22262216    if (rc == FALSE)
     
    26492639  }
    26502640  OSLibWinEnableWindow(OS2HwndFrame, fEnable);
     2641  if(fEnable == FALSE) {
     2642        //SvL: No need to clear focus as PM already does this
     2643        if(getWindowHandle() == GetCapture()) {
     2644                ReleaseCapture();  /* A disabled window can't capture the mouse */
     2645                dprintf(("Released capture for window %x that is being disabled", getWindowHandle()));
     2646        }
     2647  }
    26512648  return rc;
    26522649}
Note: See TracChangeset for help on using the changeset viewer.