summaryrefslogtreecommitdiff
path: root/src/Fl_Positioner.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-01-05 13:51:30 +0100
committerGitHub <noreply@github.com>2023-01-05 13:51:30 +0100
commit8826dca1066361b474139bcc5aeed2e3a5246ed0 (patch)
tree6819629ff3f9f014269c7cee090ab20a824af6ad /src/Fl_Positioner.cxx
parent4d1a508c7e4d28fd53129da79f068a275d7160bd (diff)
Add close buttons for individual tabs in Fl_Tabs (#628)
Add close buttons for Fl_Tabs Introducing callback reasons FLUID shows all FL_WHEN_... options Adding Fl_Tabs overflow types Improved test/tabs to show new features
Diffstat (limited to 'src/Fl_Positioner.cxx')
-rw-r--r--src/Fl_Positioner.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Fl_Positioner.cxx b/src/Fl_Positioner.cxx
index af86685c1..4bdcad797 100644
--- a/src/Fl_Positioner.cxx
+++ b/src/Fl_Positioner.cxx
@@ -99,8 +99,12 @@ int Fl_Positioner::handle(int event, int X, int Y, int W, int H) {
if (!(when() & FL_WHEN_CHANGED ||
(when() & FL_WHEN_RELEASE && event == FL_RELEASE))) return 1;
if (changed() || when()&FL_WHEN_NOT_CHANGED) {
- if (event == FL_RELEASE) clear_changed();
- do_callback();
+ Fl_Callback_Reason reason = changed() ? FL_REASON_CHANGED : FL_REASON_SELECTED;
+ if (event == FL_RELEASE) {
+ clear_changed();
+ reason = FL_REASON_RELEASED;
+ }
+ do_callback(reason);
}
return 1;
default: