X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2646f485163f410baaad5bcf49028c604a352d19..6dd18972d509fce16afa05eba194ca21db2c48f3:/src/mac/classic/app.cpp?ds=sidebyside diff --git a/src/mac/classic/app.cpp b/src/mac/classic/app.cpp index 613c323b92..85c556b21d 100644 --- a/src/mac/classic/app.cpp +++ b/src/mac/classic/app.cpp @@ -387,7 +387,7 @@ MenuEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) return eventNotHandledErr; } -// due to the rather low-level event API of wxWindows, we cannot use RunApplicationEventLoop +// due to the rather low-level event API of wxWidgets, we cannot use RunApplicationEventLoop // but have to use ReceiveNextEvent dealing with events manually, therefore we also have // deal with clicks in the menu bar explicitely @@ -841,15 +841,15 @@ void wxStAppResource::OpenSharedLibraryResource(const void *initBlock) NSModule theModule; const char *theLibPath; - gSharedLibraryBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.wxwindows.wxWindows")); + gSharedLibraryBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.wxwindows.wxWidgets")); if (gSharedLibraryBundle != NULL) { - // wxWindows has been bundled into a framework + // wxWidgets has been bundled into a framework // load the framework resources gSharedLibraryResource = CFBundleOpenBundleResourceMap(gSharedLibraryBundle); } else { - // wxWindows is a simple dynamic shared library + // wxWidgets is a simple dynamic shared library // load the resources from the data fork of a separate resource file wxString theResPath; wxString theName; @@ -1853,6 +1853,7 @@ int wxKeyCodeToMacModifier(wxKeyCode key) bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below { +#if __WXMAC_CARBON__ //#ifdef __DARWIN__ // wxHIDKeyboard keyboard; // return keyboard.IsActive(key); @@ -1862,11 +1863,11 @@ bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below //a known apple bug prevents the system from determining led //states with GetKeys... can only determine caps lock led return !!(GetCurrentKeyModifiers() & wxKeyCodeToMacModifier(key)); -//else -// KeyMapByteArray keymap; -// GetKeys((BigEndianLong*)keymap); -// return !!(BitTst(keymap, (sizeof(KeyMapByteArray)*8) - iKey)); -//#endif +#else + KeyMap keymap; + GetKeys(keymap); + return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key)); +#endif } #if !TARGET_CARBON