Ignore:
Timestamp:
Oct 20, 2003, 7:17:23 PM (22 years ago)
Author:
sandervl
Message:

PM windows should have no owner if none is specified. (instead of their parent)

File:
1 edited

Legend:

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

    r10240 r10275  
    1 /* $Id: pmwindow.cpp,v 1.219 2003-08-22 13:16:45 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.220 2003-10-20 17:17:22 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    1919#define INCL_DOSDEVIOCTL
    2020#define INCL_WINTRACKRECT
     21#define INCL_BASE
    2122
    2223#include <os2wrap.h>
     
    5354#include <winscan.h>
    5455#include <oslibdnd.h>
     56#include <custombuild.h>
    5557#include <win\dbt.h>
    5658#include "dragdrop.h"
     
    504506 POSTMSG_PACKET  *postmsg;
    505507 OSLIBPOINT       point, ClientPoint;
    506 
     508 EXCEPTIONREGISTRATIONRECORD exceptRegRec = {0,0};
     509
     510    ODIN_SetExceptionHandler(&exceptRegRec);
    507511    // restore our FS selector
    508512    SetWin32TIB();
     
    581585        RELEASE_WNDOBJ(win32wnd);
    582586        RestoreOS2TIB();
     587        ODIN_UnsetExceptionHandler(&exceptRegRec);
    583588
    584589#ifdef DEBUG
     
    749754    }
    750755   
     756#ifdef DEBUG
    751757    case WM_SETFOCUS:
    752758    {
    753759        HWND hwndFocus = (HWND)mp1;
    754760        dprintf(("OS2: WM_SETFOCUS %x %x (%x) %d cur focus %x", win32wnd->getWindowHandle(), mp1, OS2ToWin32Handle(hwndFocus), mp2, WinQueryFocus(HWND_DESKTOP)));
    755         break;
    756     }
     761        if(WinQueryFocus(HWND_DESKTOP) == win32wnd->getOS2FrameWindowHandle()) {
     762            dprintf(("WARNING: Focus set to frame window"));
     763        }
     764        break;
     765    }
     766#endif
    757767
    758768    //Handle all focus processed during WM_FOCUSCHANGED; PM doesn't like focus
     
    11481158    if(win32wnd) RELEASE_WNDOBJ(win32wnd);
    11491159    RestoreOS2TIB();
     1160    ODIN_UnsetExceptionHandler(&exceptRegRec);
    11501161
    11511162#ifdef DEBUG
     
    11571168//  dprintf(("OS2: RunDefWndProc msg %x for %x", msg, hwnd));
    11581169    if(win32wnd) RELEASE_WNDOBJ(win32wnd);
     1170
    11591171    RestoreOS2TIB();
     1172    ODIN_UnsetExceptionHandler(&exceptRegRec);
    11601173
    11611174#ifdef DEBUG
     
    11741187 MRESULT          rc = 0;
    11751188 MSG              winMsg, *pWinMsg;
     1189 EXCEPTIONREGISTRATIONRECORD exceptRegRec = {0,0};
    11761190
    11771191#ifdef DEBUG
     
    11791193#endif
    11801194
     1195    ODIN_SetExceptionHandler(&exceptRegRec);
    11811196    //Restore our FS selector
    11821197    SetWin32TIB();
     
    18901905        rc = pfnFrameWndProc(hwnd, msg, mp1, mp2);
    18911906        SetWin32TIB();
    1892         dprintf2(("PMFRAME:WM_QUERYFOCUSCHAIN %x fsCmd %x parent %x returned %x", win32wnd->getWindowHandle(), SHORT1FROMMP(mp1), (mp2) ? OS2ToWin32Handle((DWORD)mp2) : 0, (rc) ? OS2ToWin32Handle((DWORD)rc) : 0));
     1907        dprintf2(("PMFRAME:WM_QUERYFOCUSCHAIN %x fsCmd %x parent %x returned %x (%x)", win32wnd->getWindowHandle(), SHORT1FROMMP(mp1), (mp2) ? OS2ToWin32Handle((DWORD)mp2) : 0, (rc) ? OS2ToWin32Handle((DWORD)rc) : 0, rc));
    18931908        break;
    18941909//        goto RunDefFrameWndProc;
     
    21642179    if(win32wnd) RELEASE_WNDOBJ(win32wnd);
    21652180    RestoreOS2TIB();
     2181    ODIN_UnsetExceptionHandler(&exceptRegRec);
    21662182
    21672183#ifdef DEBUG
     
    21742190    if(win32wnd) RELEASE_WNDOBJ(win32wnd);
    21752191    RestoreOS2TIB();
     2192    ODIN_UnsetExceptionHandler(&exceptRegRec);
    21762193
    21772194#ifdef DEBUG
     
    21842201    if(win32wnd) RELEASE_WNDOBJ(win32wnd);
    21852202    RestoreOS2TIB();
     2203    ODIN_UnsetExceptionHandler(&exceptRegRec);
     2204
    21862205    //calling WinDefWindowProc here breaks Opera hotlist window (WM_ADJUSTWINDOWPOS)
    21872206//    return pfnFrameWndProc(hwnd, msg, mp1, mp2);
     
    22002219    TEB             *teb;
    22012220    MRESULT          rc = 0;
     2221    EXCEPTIONREGISTRATIONRECORD exceptRegRec = {0,0};
    22022222
    22032223    //Restore our FS selector
     
    22182238    RestoreOS2TIB();
    22192239    rc = pfnOldWindowProc(hwnd, msg, mp1, mp2);
     2240
     2241    ODIN_SetExceptionHandler(&exceptRegRec);
    22202242    SetWin32TIB();
    22212243    switch(msg) {
     
    22392261    if(win32wnd) RELEASE_WNDOBJ(win32wnd);
    22402262    RestoreOS2TIB();
     2263    ODIN_UnsetExceptionHandler(&exceptRegRec);
    22412264    return rc;
    22422265
Note: See TracChangeset for help on using the changeset viewer.