#endif
#endif
-#include "apprsrc.h"
+// #include "apprsrc.h"
#include "wx/mac/uma.h"
#include "wx/mac/macnotfy.h"
result = wxMacAppMenuEventHandler( handler , event , data ) ;
break ;
case kEventClassMouse :
- result = wxMacTopLevelMouseEventHandler( handler , event , data ) ;
+ result = wxMacTopLevelMouseEventHandler( handler , event , NULL ) ;
break ;
case kEventClassAppleEvent :
{
#if 1
// flow into log
- wxLogDebug( wxT("AssertMacros: %s %s %s file: %s, line: %d (value %d)\n"),
+ wxLogDebug( wxT("AssertMacros: %s %s %s file: %s, line: %ld (value %p)\n"),
assertionStr.c_str() ,
exceptionStr.c_str() ,
errorStr.c_str(),
#else
wxOnAssert(fileNameStr, lineNumber , assertionStr ,
- wxString::Format( wxT("%s %s value (%d)") ,exceptionStr, errorStr , value ) ) ;
+ wxString::Format( wxT("%s %s value (%p)") ,exceptionStr, errorStr , value ) ) ;
#endif
}
#if wxUSE_THREADS
if (g_numberOfThreads)
{
+ YieldToAnyThread() ;
sleepTime = kEventDurationNoWait;
}
else
MacHandleUnhandledEvent(evr);
}
wxMacProcessNotifierAndPendingEvents() ;
+#if wxUSE_THREADS
+ wxMutexGuiLeaveOrEnter();
+#endif // wxUSE_THREADS
}
long wxMacTranslateKey(unsigned char key, unsigned char code) ;
if ( handled && event.GetSkipped() )
handled = false ;
}
- if ( !handled &&
- (keyval == WXK_TAB) &&
-// CS: copied the change below from wxGTK
-// VZ: testing for wxTE_PROCESS_TAB shouldn't be done here the control may
-// have this style, yet choose not to process this particular TAB in which
-// case TAB must still work as a navigational character
-#if 0
- (!focus->HasFlag(wxTE_PROCESS_TAB)) &&
-#endif
- (focus->GetParent()) &&
- (focus->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
+ if ( !handled && (keyval == WXK_TAB) )
{
- wxNavigationKeyEvent new_event;
- new_event.SetEventObject( focus );
- new_event.SetDirection( !event.ShiftDown() );
- /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
- new_event.SetWindowChange( event.ControlDown() );
- new_event.SetCurrentFocus( focus );
- handled = focus->GetEventHandler()->ProcessEvent( new_event );
- if ( handled && new_event.GetSkipped() )
- handled = false ;
+ wxWindow* iter = focus->GetParent() ;
+ while( iter && !handled )
+ {
+ if ( iter->HasFlag( wxTAB_TRAVERSAL ) )
+ {
+ wxNavigationKeyEvent new_event;
+ new_event.SetEventObject( focus );
+ new_event.SetDirection( !event.ShiftDown() );
+ /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
+ new_event.SetWindowChange( event.ControlDown() );
+ new_event.SetCurrentFocus( focus );
+ handled = focus->GetParent()->GetEventHandler()->ProcessEvent( new_event );
+ if ( handled && new_event.GetSkipped() )
+ handled = false ;
+ }
+ iter = iter->GetParent() ;
+ }
}
// backdoor handler for default return and command escape
if ( !handled && (!focus->IsKindOf(CLASSINFO(wxControl) ) || !focus->MacCanFocus() ) )