diff options
Diffstat (limited to 'body/c_fl_button.cpp')
-rw-r--r-- | body/c_fl_button.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/body/c_fl_button.cpp b/body/c_fl_button.cpp index 409b190..ba08bc9 100644 --- a/body/c_fl_button.cpp +++ b/body/c_fl_button.cpp @@ -6,22 +6,18 @@ #include <FL/Fl_Button.H> #include "c_fl_button.h" +#include "c_fl.h" -// Telprot stopovers +// Telprot stopover extern "C" void button_extra_init_hook(void * aobj, int x, int y, int w, int h, const char * l); void fl_button_extra_init(void * adaobj, int x, int y, int w, int h, const char * label) { button_extra_init_hook(adaobj, x, y, w, h, label); } -extern "C" void button_extra_final_hook(void * aobj); -void fl_button_extra_final(void * adaobj) { - button_extra_final_hook(adaobj); -} - @@ -75,7 +71,11 @@ BUTTON new_fl_button(int x, int y, int w, int h, char* label) { } void free_fl_button(BUTTON b) { - delete static_cast<My_Button*>(b); + if (fl_inside_callback) { + fl_delete_widget(b); + } else { + delete static_cast<My_Button*>(b); + } } |