]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/textctrl.mm
notify the event loop that synthesized events are on the queue, wait for them to...
[wxWidgets.git] / src / osx / cocoa / textctrl.mm
index 4d4398e2d29d464cf10404307675223b51e9bef7..760257f4f4547e0afa9139dd416ca4331cf1fe1d 100644 (file)
@@ -183,9 +183,9 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
     if ( impl )
     {
         NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
-        NSView* otherView = [responder isKindOfClass:[NSView class]] ? (NSView*)responder : nil;
+        NSView* otherView = wxOSXGetViewFromResponder(responder);
         
-        wxWidgetImpl* otherWindow = impl->FindFromWXWidget(otherView);
+        wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView);
         impl->DoNotifyFocusEvent( false, otherWindow );
     }
 }
@@ -341,9 +341,9 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
     if ( impl )
     {
         NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
-        NSView* otherView = [responder isKindOfClass:[NSView class]] ? (NSView*)responder : nil;
+        NSView* otherView = wxOSXGetViewFromResponder(responder);
         
-        wxWidgetImpl* otherWindow = impl->FindFromWXWidget(otherView);
+        wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView);
         impl->DoNotifyFocusEvent( false, otherWindow );
     }
 }
@@ -515,9 +515,9 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
         }
 
         NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
-        NSView* otherView = [responder isKindOfClass:[NSView class]] ? (NSView*)responder : nil;
+        NSView* otherView = wxOSXGetViewFromResponder(responder);
         
-        wxWidgetImpl* otherWindow = impl->FindFromWXWidget(otherView);
+        wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView);
         impl->DoNotifyFocusEvent( false, otherWindow );
     }
 }