]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/window_osx.cpp
attempt to get the 'new focus' window parameter of a focus kill event set correctly
[wxWidgets.git] / src / osx / window_osx.cpp
index cd7a53c8aa6ee8311b8ed806da39b1a51096ae90..e1ce896e63642ca7672d59dc4419cebc5f3e9df8 100644 (file)
@@ -614,12 +614,14 @@ void wxWindowMac::OSXSimulateFocusEvents()
         {
             wxFocusEvent event( wxEVT_KILL_FOCUS, former->GetId());
             event.SetEventObject(former);
+            event.SetWindow(this);
             former->HandleWindowEvent(event) ;
         }
 
         {
             wxFocusEvent event(wxEVT_SET_FOCUS, former->GetId());
             event.SetEventObject(former);
+            event.SetWindow(this);
             former->HandleWindowEvent(event);
         }
     }
@@ -2190,7 +2192,8 @@ bool wxWindowMac::MacHasScrollBarCorner() const
             const wxFrame *frame = wxDynamicCast( win, wxFrame ) ;
             if ( frame )
             {
-                if ( frame->GetWindowStyleFlag() & wxRESIZE_BORDER )
+                // starting from 10.7 there are no resize indicators anymore
+                if ( (frame->GetWindowStyleFlag() & wxRESIZE_BORDER) && UMAGetSystemVersion() < 0x1070)
                 {
                     // Parent frame has resize handle
                     wxPoint frameBottomRight = frame->GetScreenRect().GetBottomRight();
@@ -2740,13 +2743,13 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event )
             {
                 wxEvtHandler * const handler = ancestor->GetEventHandler();
 
-                wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
+                wxCommandEvent command_event( wxEVT_MENU, command );
                 handled = handler->ProcessEvent( command_event );
 
                 if ( !handled )
                 {
                     // accelerators can also be used with buttons, try them too
-                    command_event.SetEventType(wxEVT_COMMAND_BUTTON_CLICKED);
+                    command_event.SetEventType(wxEVT_BUTTON);
                     handled = handler->ProcessEvent( command_event );
                 }