]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/toplevel_osx.cpp
reset the tooltip text before changing it, this apparently prevents a spurious redraw...
[wxWidgets.git] / src / osx / toplevel_osx.cpp
index 1886e988c9bb4be69477ff7a627b9d23abb19b3b..738b5d607d38f899c0fe7b3a7f2889393379748d 100644 (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