From: Stefan Csomor Date: Mon, 19 Aug 2002 19:40:28 +0000 (+0000) Subject: corrected button modifier state in carbon, cursor setup corrected X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/49a9ce1b649d61fee6e25bd789724f51233a97f6 corrected button modifier state in carbon, cursor setup corrected git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 268e014276..6da3392881 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -1384,7 +1384,11 @@ void wxApp::MacHandleModifierEvents( WXEVENTREF evr ) } else { - ev->modifiers = GetCurrentKeyModifiers() ; + EventRecord nev ; + WaitNextEvent( 0 , &nev , 0 , NULL ) ; + ev->modifiers = nev.modifiers ; + // KeyModifiers unfortunately don't include btnState... +// ev->modifiers = GetCurrentKeyModifiers() ; } #endif if ( ev->modifiers != s_lastModifiers && wxWindow::FindFocus() != NULL ) @@ -2143,23 +2147,30 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr ) switch (windowPart) { - // fixes for setting the cursor back from dominic mazzoni - case inMenuBar : - UMAShowArrowCursor(); - break ; - case inSysWindow : - UMAShowArrowCursor(); - break ; - default: + case inContent : { wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ; if ( win ) win->MacMouseMoved( ev , windowPart ) ; else - UMAShowArrowCursor(); - + { + if ( wxIsBusy() ) + { + } + else + UMAShowArrowCursor(); + } } break; + default : + { + if ( wxIsBusy() ) + { + } + else + UMAShowArrowCursor(); + } + break ; } } break ; diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 268e014276..6da3392881 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -1384,7 +1384,11 @@ void wxApp::MacHandleModifierEvents( WXEVENTREF evr ) } else { - ev->modifiers = GetCurrentKeyModifiers() ; + EventRecord nev ; + WaitNextEvent( 0 , &nev , 0 , NULL ) ; + ev->modifiers = nev.modifiers ; + // KeyModifiers unfortunately don't include btnState... +// ev->modifiers = GetCurrentKeyModifiers() ; } #endif if ( ev->modifiers != s_lastModifiers && wxWindow::FindFocus() != NULL ) @@ -2143,23 +2147,30 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr ) switch (windowPart) { - // fixes for setting the cursor back from dominic mazzoni - case inMenuBar : - UMAShowArrowCursor(); - break ; - case inSysWindow : - UMAShowArrowCursor(); - break ; - default: + case inContent : { wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ; if ( win ) win->MacMouseMoved( ev , windowPart ) ; else - UMAShowArrowCursor(); - + { + if ( wxIsBusy() ) + { + } + else + UMAShowArrowCursor(); + } } break; + default : + { + if ( wxIsBusy() ) + { + } + else + UMAShowArrowCursor(); + } + break ; } } break ;