diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2018-12-07 17:50:28 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2018-12-07 17:52:32 +0100 |
| commit | 7c1ccfa03875e47e178f0852e8e9ae05bcc554a2 (patch) | |
| tree | 8989b6ae17d85ed7f705ca1a736797bcbc082f34 /src/Fl_Choice.cxx | |
| parent | 6e49ce0a2816cd332db9ca16d0c0c0d9156fb251 (diff) | |
Complete fix for STR #3503 (Fl_Choice).
Fl_Choice::handle() needs to be fixed as well.
Diffstat (limited to 'src/Fl_Choice.cxx')
| -rw-r--r-- | src/Fl_Choice.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx index 4bf4e7dd3..d12f473e3 100644 --- a/src/Fl_Choice.cxx +++ b/src/Fl_Choice.cxx @@ -173,6 +173,7 @@ int Fl_Choice::value(int v) { int Fl_Choice::handle(int e) { if (!menu() || !menu()->text) return 0; const Fl_Menu_Item* v; + Fl_Widget_Tracker wp(this); switch (e) { case FL_ENTER: case FL_LEAVE: @@ -187,12 +188,14 @@ int Fl_Choice::handle(int e) { if (Fl::scheme() || fl_contrast(textcolor(), FL_BACKGROUND2_COLOR) != textcolor()) { v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this); + if (wp.deleted()) return 1; } else { // In order to preserve the old look-n-feel of "white" menus, // temporarily override the color() of this widget... Fl_Color c = color(); color(FL_BACKGROUND2_COLOR); v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this); + if (wp.deleted()) return 1; color(c); } if (!v || v->submenu()) return 1; |
