nanogui: GrCheckNextEvent blocks when app linked into server
Subject:
GrCheckNextEvent blocks when app linked into server
From:
Olaf Meeuwissen ####@####.####
Date:
27 Aug 2001 06:28:41 -0000
Message-Id: <874rqu81at.fsf@frodo.epkowa.co.jp>
Dear all,
I've run into a little problem when linking my application into the
server (0.89pre7). The same behaviour can be seen with the logfont
demo in src/demos/nanox/. The font names will not appear until the
application receives events. If you carefully generate your events
you can control the speed at which font names appear.
When running in a client/server setup everything is hunky-dory, but
with the application linked into the server (-DNONETWORK), it waits
for events because GrCheckNextEvent eventually calls GsSelect(0L).
In GsSelect, the following piece of code blocks if GdGetNextTimeout
returns false, which it does if (!timeout && !timerlist). That is,
for timeout == 0 && !timerlist.
/* Set up the timeout for the main select(): */
if(GdGetNextTimeout(&tout, timeout) == TRUE)
to = &tout;
else to = NULL;
/* Wait for some input on any of the fds in the set or a timeout: */
if((e = select(setsize+1, &rfds, NULL, NULL, to)) > 0) {
I've mucked around int GdGetNextTimeout and things work for me now but
in doing so I've also badly broken the spec for GrGetNextEventTimeout
and GrGetNextEvent.
How do I fix this _cleanly_?
Please CC as I'm not on the list.
BTW, it'd be nice if the archive were searchable!
--
Olaf Meeuwissen Epson Kowa Corporation, Research and Development