[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XForms] Running code when application is closed by window manager
From: |
jon |
Subject: |
Re: [XForms] Running code when application is closed by window manager |
Date: |
Wed, 04 Apr 2018 23:33:37 +0100 |
> Jon,
>
> In one of my old xforms application I have code like this (edited for
> clarity)
>
> fl_set_atclose(CB_killed, (void *) fd_myGUI->myGUI);
>
> int CB_killed(FL_FORM *form, void *data)
> {
> /* Is this the main form being killed ? */
> if (form == (FL_FORM *) data) {
> return(my_exit_handler(...));
> }
> /* If not, hide it, don't kill it. */
> fl_hide_form(form);
> return(FL_IGNORE);
> }
>
>
> my_exit_handler() returns FL_OK (or FL_IGNORE to ignore the close)
>
> Cheers
> Clive
>
>
Exactly what I needed :-)
Many thanks,
Jon