|
|
El 24/11/20 a las 14:31, david allen escribió:
My impression is that clicking X in the title bar executes the
window's destructor, but that does not seem to be the case for a popup
window. In the attached demo the intent is for clicking the X has the
same effect as clicking the close button. It appears that the
destructor is never called.
Indeed. That seems to be the case. You can fix it by attaching the
callback to window instead, like:
PopUPWin::PopUPWin(int x, int y, int w, int h, const char* label):
Fl_Double_Window(x, y, w, h, label)
{
hide();
set_modal();
show();
begin();
button = new Fl_Button(x+10, y+10, 100, 30, "Close");
end();
button->callback(close_CB, this);
callback( close_CB, this ); // new line
}
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/07fba13e-3e0f-c78e-651e-233d514b7113%40gmail.com.
[ Direct Link to Message ] | |
|
| |