- Timestamp:
- Aug 23, 2002, 5:06:01 PM (23 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r9008 r9101 1 /* $Id: pmwindow.cpp,v 1.18 7 2002-08-15 15:45:45sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.188 2002-08-23 15:06:00 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 1070 1070 } 1071 1071 1072 //hack alert; PM crashes if child calls DestroyWindow for parent/owner in WM_DESTROY 1073 // handler; must postpone it, so do it here 1074 case WIN32APP_POSTPONEDESTROY: 1075 OSLibWinDestroyWindow(hwnd); 1076 break; 1077 //hack end 1078 1072 1079 #ifdef DEBUG 1073 1080 case WM_CLOSE: -
trunk/src/user32/win32wbase.cpp
r9001 r9101 1 /* $Id: win32wbase.cpp,v 1.33 5 2002-08-14 10:37:44sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.336 2002-08-23 15:06:01 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 149 149 fParentChange = FALSE; 150 150 fDestroyWindowCalled = FALSE; 151 fChildDestructionInProgress = FALSE; 151 152 fTaskList = FALSE; 152 153 fParentDC = FALSE; … … 924 925 925 926 if(fDestroyWindowCalled == FALSE) 926 {//this window was destroyed because DestroyWindow was called for it 's parent927 {//this window was destroyed because DestroyWindow was called for its parent 927 928 //so: send a WM_PARENTNOTIFY now as that hasn't happened yet 928 929 if((getStyle() & WS_CHILD) && !(getExStyle() & WS_EX_NOPARENTNOTIFY)) … … 2683 2684 //****************************************************************************** 2684 2685 //Also destroys all the child windows (destroy children first, parent last) 2686 //TODO: Don't rely on PM to do the right thing. Send WM_(NC)DESTROY & 2687 // destroy children ourselves (see Wine) 2685 2688 //****************************************************************************** 2686 2689 BOOL Win32BaseWindow::DestroyWindow() … … 2760 2763 2761 2764 fDestroyWindowCalled = TRUE; 2762 return OSLibWinDestroyWindow(OS2HwndFrame); 2765 2766 //hack alert; PM crashes if child calls DestroyWindow for parent/owner in WM_DESTROY 2767 // handler; must postpone it 2768 if(fChildDestructionInProgress) { 2769 dprintf(("Postponing parent destruction because of dying child")); 2770 OSLibPostMessageDirect(OS2HwndFrame, WIN32APP_POSTPONEDESTROY, 0, 0); 2771 return TRUE; 2772 } 2773 2774 BOOL fOldChildDestructionInProgress = FALSE; 2775 if(GetParent()) { 2776 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromHandle(GetParent()); 2777 if(window) { 2778 fOldChildDestructionInProgress = window->IsChildDestructionInProgress(); 2779 window->SetChildDestructionInProgress(TRUE); 2780 RELEASE_WNDOBJ(window); 2781 } 2782 } 2783 //hack end 2784 2785 BOOL ret = OSLibWinDestroyWindow(OS2HwndFrame); 2786 2787 //hack alert; PM crashes if child calls DestroyWindow for parent/owner in WM_DESTROY 2788 // handler; must postpone it 2789 if(GetParent()) { 2790 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromHandle(GetParent()); 2791 if(window) { 2792 window->SetChildDestructionInProgress(fOldChildDestructionInProgress); 2793 RELEASE_WNDOBJ(window); 2794 } 2795 } 2796 //hack end 2797 return ret; 2763 2798 } 2764 2799 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r8553 r9101 1 /* $Id: win32wbase.h,v 1.14 3 2002-06-02 19:34:36sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.144 2002-08-23 15:06:01 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 73 73 //NOTE Must be smaller than WIN32APP_POSTMSG! 74 74 #define WIN32APP_SETFOCUSMSG (WIN32APP_POSTMSG-1) 75 #define WIN32APP_POSTPONEDESTROY (WIN32APP_POSTMSG-2) 75 76 76 77 #define WIN32MSG_MAGICA 0x12345678 … … 284 285 BOOL IsWindowDestroyed() { return state >= STATE_DESTROYED; }; 285 286 BOOL IsWindowIconic(); 287 288 //hack alert (see DestroyWindow) 289 BOOL IsChildDestructionInProgress() { return fChildDestructionInProgress; }; 290 void SetChildDestructionInProgress(BOOL fDestuctionInProgress) 291 { 292 fChildDestructionInProgress = fDestuctionInProgress; 293 }; 294 //hack end 295 286 296 //Window procedure type 287 297 BOOL IsWindowUnicode(); … … 415 425 fParentChange:1, 416 426 fDestroyWindowCalled:1, //DestroyWindow was called for this window 427 fChildDestructionInProgress:1, 417 428 fTaskList:1, //should be listed in PM tasklist or not 418 429 fXDefault:1,
Note:
See TracChangeset
for help on using the changeset viewer.