> main()
> {
> ......
> while (true) {
> if (fl_check_forms() == FL_EVENT){
> fprintf(stderr, "LyX: This shouldn't happen....\n");
> fl_XNextEvent(&ev);
> }
> nap(100);
> }
> ......
> }
>
> There's no processing here in this while loop, seems to work with
> callback's.
If there is no processing in the loop unrelated to events, then why
is LyX calling the unblocking fl_check_forms()? Change it to call
the blocking fl_do_forms() instead, like this:
int
main ( int argc, char *argv[] )
{
......
while ( true ) {
fl_do_forms ();
fprintf ( stderr, "LyX: This shouldn't happen....\n" );
}
return 0;
}
If application only uses callbacks:
fl_do_forms
/* should never get here */
If application uses some events:
loop
fl_do_forms
handle_event
end loop
If application does some other processing:
loop
fl_check_forms
if event
handle_event
end if
calculate_next_20_decimals_of_PI
end loop
-- Goran Larsson mailto:hoh@approve.se I was an atheist, http://home1.swipnet.se/%7Ew-12153/ until I found out I was God. _________________________________________________ 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/