cannot "quit" file browsers

Tristan (tristan@creative.net)
Mon, 03 Mar 1997 13:47:01 -0800

To subscribers of the xforms list from Tristan <tristan@creative.net> :

I want to be able to "close" (i.e. hide) file browsers with the
window manager's "quit" menu.

Someone suggested to add the following:

fl_set_form_atclose(fl_get_fselector_form(), at_close_ignore, NULL);

Where at_close_ignore() would be defined as:

static int
at_close_ignore(fl_form, data)
FL_FORM *fl_form;
void *data;
{
fl_hide_form(fl_form);
return FL_IGNORE;
}

I tried that, but it does not work: indeed, when I "quit"
my file browser with the window manager's "quit" menu, the
file browser form disapears, but the application hangs.

To see the problem you can modify the fbrowse.c test program as follow:
- add the at_close_ignore() routine (see above).
- add a call to the fl_set_form_atclose in the main()
routine as follow:

int
main(int argc, char *argv[])
{
fl_initialize(&argc, argv, "FormDemo", 0, 0);
create_form();

fl_clear_browser(br);
fl_add_browser_line(br,"LOAD A FILE.");
fl_set_browser_fontstyle(br,FL_FIXED_STYLE);
fl_show_form(form,FL_PLACE_FREE,FL_FULLBORDER,"Browser");

fl_set_form_atclose(fl_get_fselector_form(), at_close_ignore, NULL);

fl_do_forms();
fl_hide_form(form);
fl_free_form(form);
return 0;
}

Run the fbrowse program, click on the Load button, and "quit"
the file browser with the file manager "quit" menu.

The file browser forms disapear, but the application
hangs. This looks like a bug of Xforms.

I can reproduce that on Linux and Solaris (xform 0.81).

-- 
Regards, -- Tristan Savatier (mailto:tristan@mpegtv.com)
           
MpegTV website:   /cgi-bin/exit-to?http://www.mpegtv.com
MPEG.ORG website: http://www.mpeg.org
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/