X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/902ddbfd3e05276b8d575974885256a2134e8fb4..6fec48b709255fe4197e425db9166b9ffca55233:/src/osx/cocoa/evtloop.mm diff --git a/src/osx/cocoa/evtloop.mm b/src/osx/cocoa/evtloop.mm index e558a54e25..b170ae0db6 100644 --- a/src/osx/cocoa/evtloop.mm +++ b/src/osx/cocoa/evtloop.mm @@ -39,6 +39,9 @@ // wxEventLoop implementation // ============================================================================ +#if 0 + +// in case we want to integrate this static NSUInteger CalculateNSEventMaskFromEventCategory(wxEventCategory cat) { @@ -98,6 +101,7 @@ static NSUInteger CalculateNSEventMaskFromEventCategory(wxEventCategory cat) return mask; } +#endif wxGUIEventLoop::wxGUIEventLoop() { @@ -210,9 +214,9 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) return -1; default: wxFAIL_MSG("unknown response code"); - return -1; break; } + return -1; } else { @@ -307,6 +311,11 @@ void wxGUIEventLoop::BeginModalSession( wxWindow* modalWindow ) if ( modalWindow ) { + // we must show now, otherwise beginModalSessionForWindow does it but it + // also would do a centering of the window before overriding all our position + if ( !modalWindow->IsShownOnScreen() ) + modalWindow->Show(); + wxNonOwnedWindow* now = dynamic_cast (modalWindow); wxASSERT_MSG( now != NULL, "must pass in a toplevel window for modal event loop" ); nsnow = now ? now->GetWXWindow() : nil;