Ignore:
Timestamp:
Dec 24, 2000, 3:54:07 PM (25 years ago)
Author:
sandervl
Message:

MDI + SetParent + activation fixes

File:
1 edited

Legend:

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

    r4825 r4839  
    1 /* $Id: win32wbase.cpp,v 1.225 2000-12-17 15:04:11 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.226 2000-12-24 14:54:07 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    23742374void Win32BaseWindow::NotifyFrameChanged(WINDOWPOS *wpos, RECT *oldClientRect)
    23752375{
     2376 HRGN hrgn, hrgnClient;
     2377 RECT rect;
     2378
    23762379    MsgFormatFrame(NULL);
    23772380    if(RECT_WIDTH(rectClient) != RECT_WIDTH(*oldClientRect) ||
     
    23842387    SendInternalMessageA(WM_WINDOWPOSCHANGING, 0, (LPARAM)wpos);
    23852388
    2386     UnionRect(oldClientRect, oldClientRect, &rectClient);
    2387     OffsetRect(oldClientRect, -rectClient.left, -rectClient.top);
    2388     InvalidateRect(getWindowHandle(), oldClientRect, TRUE);
    2389 
    23902389    if ((wpos->hwndInsertAfter != wpOld.hwndInsertAfter) ||
    23912390        (wpos->x != wpOld.x) || (wpos->y != wpOld.y) || (wpos->cx != wpOld.cx) || (wpos->cy != wpOld.cy) || (wpos->flags != wpOld.flags))
     
    23952394    }
    23962395    else SendInternalMessageA(WM_WINDOWPOSCHANGED, 0, (LPARAM)wpos);
     2396
     2397    rect = rectWindow;
     2398    OffsetRect(&rect, -rectWindow.left, -rectWindow.top);
     2399    hrgn = CreateRectRgnIndirect(&rect);
     2400    if (!hrgn) {
     2401         dprintf(("ERROR: NotifyFrameChanged, CreateRectRgnIndirect failed!!"));
     2402         return;
     2403    }
     2404    rect = rectClient;
     2405    OffsetRect(&rect, -rectClient.left, -rectClient.top);
     2406    hrgnClient = CreateRectRgnIndirect(&rect);
     2407    if (!hrgn) {
     2408         dprintf(("ERROR: NotifyFrameChanged, CreateRectRgnIndirect failed!!"));
     2409         return;
     2410    }
     2411    CombineRgn(hrgn, hrgn, hrgnClient, RGN_DIFF);
     2412    DeleteObject(hrgnClient);
     2413
     2414    if(!EqualRect(oldClientRect, &rectClient)) {
     2415         UnionRect(oldClientRect, oldClientRect, &rectClient);
     2416         OffsetRect(oldClientRect, -rectClient.left, -rectClient.top);
     2417         hrgnClient = CreateRectRgnIndirect(oldClientRect);
     2418         if (!hrgn) {
     2419              dprintf(("ERROR: NotifyFrameChanged, CreateRectRgnIndirect failed!!"));
     2420              return;
     2421         }
     2422         CombineRgn(hrgn, hrgn, hrgnClient, RGN_OR);
     2423         DeleteObject(hrgnClient);
     2424    }
     2425    InvalidateRgn(getWindowHandle(), hrgn, TRUE);
     2426    DeleteObject(hrgn);
    23972427}
    23982428//******************************************************************************
     
    25522582   if(fCreated && (getStyle() & WS_VISIBLE)) {
    25532583        ShowWindow(SW_HIDE);
    2554     fShow = TRUE;
     2584        fShow = TRUE;
    25552585   }
    25562586
     
    25632593        if(!(getStyle() & WS_CHILD))
    25642594        {
    2565         //TODO: Send WM_STYLECHANGED msg?
     2595            //TODO: Send WM_STYLECHANGED msg?
    25662596            setStyle(getStyle() | WS_CHILD);
    25672597            if(getWindowId())
     
    25862616   */
    25872617   if(fCreated) {
    2588     SetWindowPos(HWND_TOPMOST, 0, 0, 0, 0,
    2589                  SWP_NOMOVE|SWP_NOSIZE|(fShow? SWP_SHOWWINDOW : 0));
     2618        SetWindowPos(HWND_TOPMOST, 0, 0, 0, 0,
     2619                     SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|(fShow? SWP_SHOWWINDOW : 0));
    25902620
    25912621   /* FIXME: a WM_MOVE is also generated (in the DefWindowProc handler
     
    29783008        }
    29793009    }
    2980 
    2981     if(OSLibWinSetActiveWindow(OS2Hwnd) == FALSE) {
    2982         dprintf(("OSLibWinSetActiveWindow %x returned FALSE!", OS2Hwnd));
    2983     }
     3010    SetWindowPos(HWND_TOP, 0,0,0,0, SWP_NOSIZE | SWP_NOMOVE );
     3011
     3012//    if(OSLibWinSetActiveWindow(OS2Hwnd) == FALSE) {
     3013//        dprintf(("OSLibWinSetActiveWindow %x returned FALSE!", OS2Hwnd));
     3014//    }
    29843015    hwndActive = GetActiveWindow();
    29853016    return (hwndActive) ? hwndActive : windowDesktop->getWindowHandle(); //pretend the desktop was active
Note: See TracChangeset for help on using the changeset viewer.