X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c326adae6bcbcc9510710116ae9eb4b5581192d..a4c46c19c20ca7717c8c30c4c5b706a31faf42c4:/src/mac/carbon/dialog.cpp?ds=sidebyside diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index af14cbc258..832ff9bc39 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -9,10 +9,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dialog.h" #endif +#include "wx/wxprec.h" + #include "wx/dialog.h" #include "wx/utils.h" #include "wx/frame.h" @@ -163,8 +165,10 @@ void wxDialog::DoShowModal() wxModalDialogs.Append(this); + SetFocus() ; + #if TARGET_CARBON -// BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ; + BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ; #else // TODO : test whether parent gets disabled bool formerModal = s_macIsInModalLoop ; @@ -177,7 +181,7 @@ void wxDialog::DoShowModal() } #if TARGET_CARBON -// EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ; + EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ; #else // TODO probably reenable the parent window if any s_macIsInModalLoop = formerModal ;