mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
STR 1869: fixed race condition when an alert window pops up during menu handling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -6,6 +6,8 @@ CHANGES IN FLTK 1.1.8
|
|||||||
STR #1742, STR #1777, STR #1794, STR #1827, STR #1843,
|
STR #1742, STR #1777, STR #1794, STR #1827, STR #1843,
|
||||||
STR #1796, STR #1815, STR #1726, STR #1753, STR #1855,
|
STR #1796, STR #1815, STR #1726, STR #1753, STR #1855,
|
||||||
STR #1862, STR #1867, STR #1874)
|
STR #1862, STR #1867, STR #1874)
|
||||||
|
- Fixed lockout when mixing popups and alerts
|
||||||
|
(STR # 1869)
|
||||||
- Fixed recursion crash in event handling (STR #1873)
|
- Fixed recursion crash in event handling (STR #1873)
|
||||||
- Fixed missing return coe in 'fltk-config' (STR #1875)
|
- Fixed missing return coe in 'fltk-config' (STR #1875)
|
||||||
- Fixed inconsistencies with CHANGED flags (STR #1719)
|
- Fixed inconsistencies with CHANGED flags (STR #1719)
|
||||||
|
|||||||
@@ -208,6 +208,10 @@ static int innards(const char* fmt, va_list ap,
|
|||||||
button[0]->shortcut(FL_Escape);
|
button[0]->shortcut(FL_Escape);
|
||||||
|
|
||||||
message_form->show();
|
message_form->show();
|
||||||
|
// deactivate Fl::grab(), because it is incompatible with Fl::readqueue()
|
||||||
|
Fl_Window* g = Fl::grab();
|
||||||
|
if (g) // do an alternative grab to avoid floating menus, if possible
|
||||||
|
Fl::grab(message_form);
|
||||||
int r;
|
int r;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Fl_Widget *o = Fl::readqueue();
|
Fl_Widget *o = Fl::readqueue();
|
||||||
@@ -217,6 +221,8 @@ static int innards(const char* fmt, va_list ap,
|
|||||||
else if (o == button[2]) {r = 2; break;}
|
else if (o == button[2]) {r = 2; break;}
|
||||||
else if (o == message_form) {r = 0; break;}
|
else if (o == message_form) {r = 0; break;}
|
||||||
}
|
}
|
||||||
|
if (g) // regrab the previous popup menu, if there was one
|
||||||
|
Fl::grab(g);
|
||||||
message_form->hide();
|
message_form->hide();
|
||||||
icon->label(prev_icon_label);
|
icon->label(prev_icon_label);
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Reference in New Issue
Block a user