xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Running code when application is closed by window manager


From: Clive Stubbings
Subject: Re: [XForms] Running code when application is closed by window manager
Date: Tue, 3 Apr 2018 23:48:21 +0100 (BST)

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


On Fri, 16 Mar 2018, jon wrote:

I am trying to write a simple xforms app, I cant seem to find any way
to run cleanup code when application is terminated by the window
manager ?

google has not helped.

Does anyone have any examples?

Thanks,
Jon






reply via email to

[Prev in Thread] Current Thread [Next in Thread]