]> git.saurik.com Git - wxWidgets.git/commitdiff
Make sure we call SetEventObject before firing events.
authorKevin Ollivier <kevino@theolliviers.com>
Thu, 5 Mar 2009 19:21:32 +0000 (19:21 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Thu, 5 Mar 2009 19:21:32 +0000 (19:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/window.mm

index e28d4fdb7684600d631815a67e64e0ceac7ae1ea..30f7692e91e3f635d7be359b95253a45cf072d2f 100644 (file)
@@ -1344,6 +1344,7 @@ bool wxWidgetCocoaImpl::DoHandleCharEvent(NSEvent *event, NSString *text)
 {
     wxKeyEvent wxevent(wxEVT_KEY_DOWN);
     SetupKeyEvent( wxevent, event, text );
+    wxevent.SetEventObject(GetWXPeer());  
 
     return GetWXPeer()->OSXHandleKeyEvent(wxevent);
 }
@@ -1352,7 +1353,7 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
 {
     wxKeyEvent wxevent(wxEVT_KEY_DOWN);
     SetupKeyEvent( wxevent, event );
-    
+    wxevent.SetEventObject(GetWXPeer());    
     bool result = GetWXPeer()->OSXHandleKeyEvent(wxevent);
 
     // this will fire higher level events, like insertText, to help
@@ -1372,6 +1373,7 @@ bool wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event)
     wxPoint pt = wxFromNSPoint( m_osxView, clickLocation );
     wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
     SetupMouseEvent( wxevent , event ) ;
+    wxevent.SetEventObject(GetWXPeer());
     wxevent.m_x = pt.x;
     wxevent.m_y = pt.y;