X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/980ee83f63d19f8c7fb3ada5f77a1fec36e8dec1..df91131cb0f90ee8bfb194926a13b1a108ca3c6e:/src/mac/carbon/app.cpp diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index e079f74d5c..b128991ff0 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -1254,7 +1254,6 @@ void wxApp::MacHandleOneEvent( WXEVENTREF evr ) #endif // wxUSE_THREADS } -long wxMacTranslateKey(unsigned char key, unsigned char code) ; long wxMacTranslateKey(unsigned char key, unsigned char code) { long retval = key ; @@ -1447,11 +1446,17 @@ wxMouseState wxGetMouseState() ms.SetX(pt.x); ms.SetY(pt.y); +#if TARGET_API_MAC_OSX UInt32 buttons = GetCurrentButtonState(); ms.SetLeftDown( (buttons & 0x01) != 0 ); ms.SetMiddleDown( (buttons & 0x04) != 0 ); ms.SetRightDown( (buttons & 0x02) != 0 ); - +#else + ms.SetLeftDown( Button() ); + ms.SetMiddleDown( 0 ); + ms.SetRightDown( 0 ); +#endif + UInt32 modifiers = GetCurrentKeyModifiers(); ms.SetControlDown(modifiers & controlKey); ms.SetShiftDown(modifiers & shiftKey); @@ -1522,7 +1527,6 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers wxKeyEvent event(wxEVT_CHAR) ; MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ; long keyval = event.m_keyCode ; - short realkeyval = short(keymessage & charCodeMask) ; bool handled = false ; @@ -1531,9 +1535,6 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers if (tlw) { event.SetEventType( wxEVT_CHAR_HOOK ); - // send original character, not the uppercase version - event.m_keyCode = realkeyval ; - handled = tlw->GetEventHandler()->ProcessEvent( event ); if ( handled && event.GetSkipped() ) handled = false ;