summaryrefslogtreecommitdiff
path: root/FL/Fl_Menu_Item.H
diff options
context:
space:
mode:
Diffstat (limited to 'FL/Fl_Menu_Item.H')
-rw-r--r--FL/Fl_Menu_Item.H6
1 files changed, 3 insertions, 3 deletions
diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H
index 7ae1faeef..0f1083a9a 100644
--- a/FL/Fl_Menu_Item.H
+++ b/FL/Fl_Menu_Item.H
@@ -390,14 +390,14 @@ struct FL_EXPORT Fl_Menu_Item {
The callback is called with the stored user_data() as its second argument.
You must first check that callback() is non-zero before calling this.
*/
- void do_callback(Fl_Widget* o) const {callback_(o, user_data_);}
+ void do_callback(Fl_Widget* o) const {Fl::callback_reason_=FL_REASON_SELECTED; callback_(o, user_data_);}
/**
Calls the Fl_Menu_Item item's callback, and provides the Fl_Widget argument.
This call overrides the callback's second argument with the given value \p arg.
You must first check that callback() is non-zero before calling this.
*/
- void do_callback(Fl_Widget* o,void* arg) const {callback_(o, arg);}
+ void do_callback(Fl_Widget* o,void* arg) const {Fl::callback_reason_=FL_REASON_SELECTED; callback_(o, arg);}
/**
Calls the Fl_Menu_Item item's callback, and provides the Fl_Widget argument.
@@ -406,7 +406,7 @@ struct FL_EXPORT Fl_Menu_Item {
the callback.
You must first check that callback() is non-zero before calling this.
*/
- void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)(fl_intptr_t)arg);}
+ void do_callback(Fl_Widget* o,long arg) const {Fl::callback_reason_=FL_REASON_SELECTED; callback_(o, (void*)(fl_intptr_t)arg);}
/** Back compatibility only.
\deprecated