Changeset 8129 for trunk/src


Ignore:
Timestamp:
Mar 28, 2002, 12:26:00 PM (23 years ago)
Author:
sandervl
Message:

Gracefully handle WM_QUIT message sent by window list

Location:
trunk/src/user32
Files:
3 edited

Legend:

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

    r8016 r8129  
    1 /* $Id: oslibmsg.cpp,v 1.53 2002-02-26 11:12:25 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.54 2002-03-28 11:25:59 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    323323                if (os2msg.msg == WM_TIMER)
    324324                    eaten = TIMER_HandleTimer(&os2msg);
     325                if (os2msg.msg == WM_QUIT && ((ULONG)os2msg.mp2 != 0) ) {
     326                    // Don't return FALSE when the window list sends us
     327                    // a WM_QUIT message, improper killing can lead to
     328                    // application crashes.
     329                    // In the WM_QUIT handler in pmwindow we send a WM_CLOSE
     330                    // in this case. When the app calls PostQuitMessage (mp2 == 0),
     331                    // then we handle it the normal way
     332                    rc = 1;
     333                }
    325334        } while (eaten);
    326335  }
  • trunk/src/user32/oslibmsgtranslate.cpp

    r7896 r8129  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.83 2002-02-13 15:10:46 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.84 2002-03-28 11:25:59 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    165165    case WM_QUIT:
    166166        winMsg->message = WINWM_QUIT;
     167        if (fMsgRemoved && win32wnd && (ULONG)os2Msg->mp2 != 0) {
     168            // mp2 != 0 -> sent by window list; be nice and close
     169            // the window first
     170            win32wnd->MsgClose();
     171        }
    167172        break;
    168173
  • trunk/src/user32/pmwindow.cpp

    r8105 r8129  
    1 /* $Id: pmwindow.cpp,v 1.170 2002-03-20 10:30:06 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.171 2002-03-28 11:26:00 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    889889    }
    890890
     891#ifdef DEBUG
     892    case WM_CLOSE:
     893    {
     894        dprintf(("PMFRAME: WM_CLOSE %x", hwnd));
     895        goto RunDefFrameWndProc;
     896    }
     897#endif
     898
    891899    case WM_PAINT:
    892900    {
Note: See TracChangeset for help on using the changeset viewer.