Hi, this is staying visible at the first click, but hides at second.
The callback at second check isnt called..
void menu_cb(Fl_Widget* w, void* data) {
Fl_Menu_* menu = (Fl_Menu_*)w;
const Fl_Menu_Item* item = menu->mvalue();
const char* feature = (const char*)data;
// Detect if click was on the checkbox square (left ~25 pixels)
bool clicked_on_checkbox = (Fl::event_x() <= 25);
if (clicked_on_checkbox) {
item->popup(0, 0);
return;
}
// Normal click on text → normal behavior (close menu + your action)
printf("Activated feature %s (state = %d)\n", feature, item->value());
}
Thanks