Forward port event handler fixes to trunk.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2008-11-22 04:10:31 +00:00
parent bb69632a56
commit c9f9deab81
6 changed files with 27 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ protected :
// contains the tag for the content (is different for password and non-password controls)
OSType m_valueTag ;
WXEVENTHANDLERREF m_macTextCtrlEventHandler ;
public :
ControlEditTextSelectionRec m_selection ;
};

View File

@@ -45,6 +45,8 @@ public:
virtual ~wxTopLevelWindowMac();
virtual bool Destroy();
virtual wxPoint GetClientAreaOrigin() const;
// Attracts the users attention to this window if the application is

View File

@@ -1,3 +1,3 @@
#if __WXOSX_CARBON__
#if wxOSX_USE_CARBON
#include "wx/osx/carbon/uma.h"
#endif

View File

@@ -468,7 +468,16 @@ bool wxWebKitCtrl::Create(wxWindow *parent,
wxWebKitCtrl::~wxWebKitCtrl()
{
MyFrameLoadMonitor* myFrameLoadMonitor = [m_webView frameLoadDelegate];
MyPolicyDelegate* myPolicyDelegate = [m_webView policyDelegate];
[m_webView setFrameLoadDelegate: nil];
[m_webView setPolicyDelegate: nil];
if (myFrameLoadMonitor)
[myFrameLoadMonitor release];
if (myPolicyDelegate)
[myPolicyDelegate release];
}
// ----------------------------------------------------------------------------

View File

@@ -509,11 +509,12 @@ void wxMacUnicodeTextControl::InstallEventHandlers()
{
::InstallControlEventHandler( m_controlRef , GetwxMacUnicodeTextControlEventHandlerUPP(),
GetEventTypeCount(unicodeTextControlEventList), unicodeTextControlEventList, this,
NULL);
(EventHandlerRef*) &m_macTextCtrlEventHandler);
}
wxMacUnicodeTextControl::~wxMacUnicodeTextControl()
{
::RemoveEventHandler((EventHandlerRef) m_macTextCtrlEventHandler);
}
void wxMacUnicodeTextControl::VisibilityChanged(bool shown)

View File

@@ -87,6 +87,17 @@ wxTopLevelWindowMac::~wxTopLevelWindowMac()
{
}
bool wxTopLevelWindowMac::Destroy()
{
// NB: this will get called during destruction if we don't do it now,
// and may fire a kill focus event on a control being destroyed
#if wxOSX_USE_CARBON
if (m_nowpeer->GetWXWindow())
ClearKeyboardFocus( (WindowRef)m_nowpeer->GetWXWindow() );
#endif
return wxTopLevelWindowBase::Destroy();
}
// ----------------------------------------------------------------------------
// wxTopLevelWindowMac maximize/minimize