CtrlLib: Prompt fixed for MT

git-svn-id: svn://ultimatepp.org/upp/trunk@7746 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-09-29 20:02:36 +00:00
parent 768d47b4ef
commit d9df7ccca4

View file

@ -61,6 +61,7 @@ int Prompt(Callback1<const String&> WhenLink,
button1, button2, button3,
cx, im1, im2, im3);
int fcy = Draw::GetStdFontCy();
EnterGuiMutex(); // Ctrl derived classes can only be initialized with GuiLock
PromptDlgWnd__ dlg;
RichTextCtrl qtfctrl;
Icon icon;
@ -133,6 +134,7 @@ int Prompt(Callback1<const String&> WhenLink,
}
dlg.WhenClose = dlg.Breaker(button3 ? -1 : 0);
dlg.Title(title);
LeaveGuiMutex();
int result;
Ctrl::Call(callback2(sExecutePrompt, &dlg, &result));
return result;