Changeset 9027 for trunk/src


Ignore:
Timestamp:
Aug 19, 2002, 3:55:05 PM (23 years ago)
Author:
sandervl
Message:

Don't send queued WM_CHAR messages for windows that have just been destroyed. (Get/PeekMessage)

File:
1 edited

Legend:

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

    r8953 r9027  
    1 /* $Id: oslibmsg.cpp,v 1.60 2002-08-01 16:04:19 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.61 2002-08-19 13:55:05 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    257257        teb->o.odin.os2msg.hwnd = 0;
    258258   
     259        if(!IsWindow(pMsg->hwnd)) {
     260            //could be a queued char message for a window that was just destroyed
     261            //when that's the case, we ignore it (MFC assertions are triggered by this)
     262            goto continuegetmsg;
     263        }
     264
    259265        // @@@PH verify this
    260266        // if this is a keyup or keydown message, we've got to
     
    406412        }
    407413        memcpy(pMsg, &teb->o.odin.msgWCHAR, sizeof(MSG));
     414
     415        if(!IsWindow(pMsg->hwnd)) {
     416            //could be a queued char message for a window that was just destroyed
     417            //when that's the case, we ignore it (MFC assertions are triggered by this)
     418            teb->o.odin.fTranslated = FALSE;
     419            teb->o.odin.os2msg.msg  = 0;
     420            teb->o.odin.os2msg.hwnd = 0;
     421            goto continuepeekmsg;
     422        }
    408423   
    409424        // @@@PH verify this
Note: See TracChangeset for help on using the changeset viewer.