mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 06:21:26 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user