Prevent common dialogs, e.g., fl_alert(), from changing the currently active Fl_Group.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2015-07-22 10:58:39 +00:00
parent 1b0e984a8f
commit 53c72bb905

View File

@ -251,7 +251,9 @@ static int innards(const char* fmt, va_list ap,
// deactivate Fl::grab(), because it is incompatible with modal windows
Fl_Window* g = Fl::grab();
if (g) Fl::grab(0);
Fl_Group *current_group = Fl_Group::current(); // make sure the dialog does not interfere with any active group
message_form->show();
Fl_Group::current(current_group);
while (message_form->shown()) Fl::wait();
if (g) // regrab the previous popup menu, if there was one
Fl::grab(g);