Send the wxWindowDestroyEvent for all ports (binary compatible backport)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2735,6 +2735,11 @@ bool wxWindowGTK::Create( wxWindow *parent,
|
||||
|
||||
wxWindowGTK::~wxWindowGTK()
|
||||
{
|
||||
// Send destroy event
|
||||
wxWindowDestroyEvent destroyEvent(this);
|
||||
destroyEvent.SetId(GetId());
|
||||
GetEventHandler()->ProcessEvent(destroyEvent);
|
||||
|
||||
if (g_focusWindow == this)
|
||||
g_focusWindow = NULL;
|
||||
|
||||
|
@@ -2735,6 +2735,11 @@ bool wxWindowGTK::Create( wxWindow *parent,
|
||||
|
||||
wxWindowGTK::~wxWindowGTK()
|
||||
{
|
||||
// Send destroy event
|
||||
wxWindowDestroyEvent destroyEvent(this);
|
||||
destroyEvent.SetId(GetId());
|
||||
GetEventHandler()->ProcessEvent(destroyEvent);
|
||||
|
||||
if (g_focusWindow == this)
|
||||
g_focusWindow = NULL;
|
||||
|
||||
|
@@ -133,6 +133,11 @@ void wxWindowMac::Init()
|
||||
// Destructor
|
||||
wxWindowMac::~wxWindowMac()
|
||||
{
|
||||
// Send destroy event
|
||||
wxWindowDestroyEvent destroyEvent(this);
|
||||
destroyEvent.SetId(GetId());
|
||||
GetEventHandler()->ProcessEvent(destroyEvent);
|
||||
|
||||
// deleting a window while it is shown invalidates the region
|
||||
if ( IsShown() ) {
|
||||
wxWindowMac* iter = this ;
|
||||
|
@@ -133,6 +133,11 @@ void wxWindowMac::Init()
|
||||
// Destructor
|
||||
wxWindowMac::~wxWindowMac()
|
||||
{
|
||||
// Send destroy event
|
||||
wxWindowDestroyEvent destroyEvent(this);
|
||||
destroyEvent.SetId(GetId());
|
||||
GetEventHandler()->ProcessEvent(destroyEvent);
|
||||
|
||||
// deleting a window while it is shown invalidates the region
|
||||
if ( IsShown() ) {
|
||||
wxWindowMac* iter = this ;
|
||||
|
@@ -563,6 +563,11 @@ void wxWindowMGL::Init()
|
||||
// Destructor
|
||||
wxWindowMGL::~wxWindowMGL()
|
||||
{
|
||||
// Send destroy event
|
||||
wxWindowDestroyEvent destroyEvent(this);
|
||||
destroyEvent.SetId(GetId());
|
||||
GetEventHandler()->ProcessEvent(destroyEvent);
|
||||
|
||||
m_isBeingDeleted = TRUE;
|
||||
|
||||
if ( gs_mouseCapture == this )
|
||||
|
@@ -3298,6 +3298,7 @@ bool wxWindowMSW::HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate)
|
||||
bool wxWindowMSW::HandleDestroy()
|
||||
{
|
||||
wxWindowDestroyEvent event((wxWindow *)this);
|
||||
event.SetId(GetId());
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
// delete our drop target if we've got one
|
||||
|
@@ -3521,7 +3521,7 @@ bool wxWindowOS2::HandleCreate(
|
||||
bool wxWindowOS2::HandleDestroy()
|
||||
{
|
||||
wxWindowDestroyEvent vEvent((wxWindow*)this);
|
||||
|
||||
vEvent.SetId(GetId());
|
||||
(void)GetEventHandler()->ProcessEvent(vEvent);
|
||||
|
||||
//
|
||||
|
@@ -340,6 +340,11 @@ bool wxWindowX11::Create(wxWindow *parent, wxWindowID id,
|
||||
// Destructor
|
||||
wxWindowX11::~wxWindowX11()
|
||||
{
|
||||
// Send destroy event
|
||||
wxWindowDestroyEvent destroyEvent(this);
|
||||
destroyEvent.SetId(GetId());
|
||||
GetEventHandler()->ProcessEvent(destroyEvent);
|
||||
|
||||
if (g_captureWindow == this)
|
||||
g_captureWindow = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user