CtrlCore: Gtk GUI_APP_MAIN now correctly handles exceptions

git-svn-id: svn://ultimatepp.org/upp/trunk@13534 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-08-12 15:03:01 +00:00
parent ee08eff11a
commit b769743e04
3 changed files with 7 additions and 1 deletions

View file

@ -60,6 +60,7 @@ int LeaveGuiMutexAll();
void EnterGuiMutex(int n);
bool ThreadHasGuiLock();
int GetGuiLockLevel();
#else
inline void EnterGuiMutex() {}
inline void LeaveGuiMutex() {}

View file

@ -64,6 +64,11 @@ bool ThreadHasGuiLock()
return Thread::IsMain() || sGLockLevel;
}
int GetGuiLockLevel()
{
return sGLockLevel;
}
void WakeUpGuiThread();
struct Ctrl::CallBox {

View file

@ -18,7 +18,7 @@ int main(int argc, char **argv, const char **envptr) { \
UPP::AppInit__(argc, (const char **)argv, envptr); \
GUI_APP_MAIN_HOOK \
UPP::InitGtkApp(argc, argv, envptr); \
GuiMainFn_(); \
UPP::AppExecute__(GuiMainFn_); \
UPP::Ctrl::CloseTopCtrls(); \
UPP::ExitGtkApp(); \
UPP::AppExit__(); \