Ignore:
Timestamp:
Sep 19, 2001, 5:39:52 PM (24 years ago)
Author:
sandervl
Message:

ported the Wine MDI control + some menu fixes

File:
1 edited

Legend:

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

    r6745 r6762  
    1 /* $Id: pmwindow.cpp,v 1.146 2001-09-17 13:31:30 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.147 2001-09-19 15:39:49 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    4444#include "syscolor.h"
    4545#include "options.h"
    46 
     46#include "menu.h"
    4747
    4848#define DBG_LOCALLOG    DBG_pmwindow
     
    787787        if(pswp->fl & SWP_NOADJUST) {
    788788            //ignore weird messages (TODO: why are they sent?)
     789            dprintf(("WARNING: WM_ADJUSTWINDOWPOS with SWP_NOADJUST flag!!"));
    789790            break;
    790791        }
     
    815816                        hParent = win32wnd->getParent()->getOS2WindowHandle();
    816817                }
    817                 else    goto RunDefWndProc;
     818                else    goto RunDefFrameWndProc;
    818819            }
    819820        }
     
    839840        win32wnd->MsgPosChanging((LPARAM)&wp);
    840841
    841         if(win32wnd->getOldStyle() != win32wnd->getStyle()) {
     842        if(win32wnd->getOldStyle() != win32wnd->getStyle())
     843        {
    842844             OSLibSetWindowStyle(win32wnd->getOS2FrameWindowHandle(), win32wnd->getOS2WindowHandle(), win32wnd->getStyle(), win32wnd->getExStyle());
    843845             if(fOS2Look) {
     
    901903                ret |= AWP_DEACTIVATE;
    902904            }
    903             if(ulFlags & SWP_ACTIVATE) {
    904                 ret |= AWP_ACTIVATE;
     905            if(ulFlags & SWP_ACTIVATE)
     906            {
     907                ULONG ulFrameFlags;
     908
     909                if(ulFlags & SWP_ZORDER) {
     910                    ulFrameFlags = WinQueryWindowUShort(hwnd, QWS_FLAGS);
     911                    WinSetWindowUShort(hwnd, QWS_FLAGS, ulFrameFlags | FF_NOACTIVATESWP);
     912                }
     913
     914                if(!(ulFlags & SWP_SHOW))
     915                {
     916                    ret |= AWP_ACTIVATE;
     917                }
     918                else
     919                {
     920                    WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, FID_CLIENT));
     921   
     922                    ulFrameFlags  = WinQueryWindowUShort(hwnd, QWS_FLAGS);
     923                    ulFrameFlags &= ~FF_NOACTIVATESWP;
     924                    WinSetWindowUShort(hwnd, QWS_FLAGS, ulFrameFlags);
     925                }
    905926            }
    906927            rc = (MRESULT)ret;
     
    911932            ret |= AWP_DEACTIVATE;
    912933        }
    913         if(ulFlags & SWP_ACTIVATE) {
    914             ret |= AWP_ACTIVATE;
     934        if(ulFlags & SWP_ACTIVATE)
     935        {
     936            ULONG ulFrameFlags;
     937
     938            if(ulFlags & SWP_ZORDER) {
     939                ulFrameFlags = WinQueryWindowUShort(hwnd, QWS_FLAGS);
     940                WinSetWindowUShort(hwnd, QWS_FLAGS, ulFrameFlags | FF_NOACTIVATESWP);
     941            }
     942
     943            if(!(ulFlags & SWP_SHOW))
     944            {
     945                ret |= AWP_ACTIVATE;
     946            }
     947            else
     948            {
     949                WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, FID_CLIENT));
     950
     951                ulFrameFlags  = WinQueryWindowUShort(hwnd, QWS_FLAGS);
     952                ulFrameFlags &= ~FF_NOACTIVATESWP;
     953                WinSetWindowUShort(hwnd, QWS_FLAGS, ulFrameFlags);
     954            }
    915955        }
    916956        rc = (MRESULT)ret;
Note: See TracChangeset for help on using the changeset viewer.