Changeset 9101 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Aug 23, 2002, 5:06:01 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.