Ignore:
Timestamp:
Nov 3, 1999, 7:00:29 PM (26 years ago)
Author:
cbratschi
Message:

modal dialog fixes

File:
1 edited

Legend:

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

    r1542 r1572  
    1 /* $Id: pmframe.cpp,v 1.17 1999-11-02 17:07:25 cbratschi Exp $ */
     1/* $Id: pmframe.cpp,v 1.18 1999-11-03 18:00:25 cbratschi Exp $ */
    22/*
    33 * Win32 Frame Managment Code for OS/2
     
    241241        dprintf(("PMFRAME: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
    242242
     243        //CB: show dialog in front of owner
     244        if (win32wnd->IsModalDialogOwner())
     245        {
     246          pswp->fl |= SWP_ZORDER;
     247          pswp->hwndInsertBehind = win32wnd->getOS2HwndModalDialog();
     248          if (pswp->fl & SWP_ACTIVATE)
     249          {
     250            pswp->fl &= ~SWP_ACTIVATE;
     251            WinSetWindowPos(win32wnd->getOS2HwndModalDialog(),0,0,0,0,0,SWP_ACTIVATE);
     252          }
     253        }
     254
    243255        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0)
    244256            goto RunDefFrameProc;
     
    394406        return rc;
    395407    }
     408
    396409    case WM_ACTIVATE:
    397410    {
     
    406419        WinSetWindowUShort(hwnd,QWS_FLAGS,mp1 ? (flags | FF_ACTIVE):(flags & ~FF_ACTIVE));
    407420
     421        //CB: show owner behind the dialog
     422        if (win32wnd->IsModalDialog())
     423        {
     424          Win32BaseWindow *topOwner = win32wnd->getOwner()->getTopParent();
     425
     426          if (topOwner) WinSetWindowPos(topOwner->getOS2FrameWindowHandle(),hwnd,0,0,0,0,SWP_ZORDER);
     427        }
    408428
    409429        RestoreOS2TIB();
     
    433453       dprintf(("PMFRAME: WM_BUTTON1DOWN"));
    434454      #endif
     455
    435456      if (InSizeBox(win32wnd,(POINTS*)&mp1))
    436457      {
Note: See TracChangeset for help on using the changeset viewer.