Re: XForms: idle_callback revisited

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 13 Aug 97 06:40:05 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> So far so good, what happens is... The same executable has two
> behaviours (client or server), from the 'client' GUI I send a
> message, but somehow it is not received until I focus on the
> server GUI! It seems to me that the idle callback isn't called
> until the application/GUI has mouse focus and this is not what
> I expected (or want)...

I use idle callbacks extensively and have never seen this sort of
behavior.

It sounds as if your application is blocking somewhere and waiting for
some event to occur, perhaps in some other callback.

Are you certain that the idle callback is definitely not being
invoked? Have you added an "I'm Here" fprintf() to see if the
callback is actually called?

> Even funnier is... if I send several messages from the demo client,
> WITHOUT focusing on the server GUI then when I finally focus on
> the `server' gui I get the first only, then I have to click on it
> another time to get the 2nd message, then another click for the
> 3rd and so on... strange isn't it? or am I misinterpreting
> something? ...

How are you handling the query for data ready? With select()? There
is a built in mechanism in XForms to handle this. You may want to
simply register an I/O handler using fl_add_io_callback() rather than
poll the socket connection.

Is it possible messages are being buffered?

spl
_________________________________________________
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/