summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-07-19 14:04:51 +0000
committerOliver Bolte <obo@openoffice.org>2005-07-19 14:04:51 +0000
commit27bb6f2b0c3fee475f305c37ebca4f7c1e613c4c (patch)
treefcb7a7e0553912046c32f42b2e88f2aa3938860f /vcl
parente0715930388256cb15827150a9a2f2c34683725f (diff)
INTEGRATION: CWS jl21bean (1.23.62); FILE MERGED
2005/05/23 09:00:59 jl 1.23.62.1: #i49709# windows were not always destroyed while reparenting
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/source/app/salinst.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index be8e3ca67077..2f2d254bd590 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salinst.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: rt $ $Date: 2005-03-29 13:05:17 $
+ * last change: $Author: obo $ $Date: 2005-07-19 15:04:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -855,6 +855,18 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
delete (SalFrame*)lParam;
rDef = FALSE;
break;
+ case SAL_MSG_DESTROYHWND:
+ //We only destroy the native window here. We do NOT destroy the SalFrame contained
+ //in the structure (GetWindowPtr()).
+ if (DestroyWindow((HWND)lParam) == 0)
+ {
+ OSL_ENSURE(0, "DestroyWindow failed!");
+ //Failure: We remove the SalFrame from the window structure. So we avoid that
+ // the window structure may contain an invalid pointer, once the SalFrame is deleted.
+ SetWindowPtr((HWND)lParam, 0);
+ }
+ rDef = FALSE;
+ break;
case SAL_MSG_CREATEOBJECT:
nRet = (LRESULT)ImplSalCreateObject( GetSalData()->mpFirstInstance, (WinSalFrame*)lParam );
rDef = FALSE;