nanogui: Patch for NONNETWORK NxLib
Subject:
Re: [nanogui] Patch for NONNETWORK NxLib
From:
"Greg Haerr" ####@####.####
Date:
13 Aug 2004 16:01:28 +0100
Message-Id: <037201c48146$5fcb9d90$3eba46a6@winXP>
: Here is a patch for NxLib running on NONNETWORK. However, I don't know if
it
: is correct or not. Can someone give me some comment ???
Yes - it looks pretty good, thanks!
: I found that the GrPeekEvent will block if there is no event on the list.
So
: I change the GsSelect(-1) to GsSelect(0);
: It is valid or not ?
:
:
: @@ -169,7 +169,8 @@
: #if NONETWORK
: /* if no events on queue, force select() event check*/
: if (elp == NULL) {
: - GsSelect(-1L); /* poll*/
: + GsSelect(0); /* poll */
The original code above is required for the normal NONETWORK
case. (Also, the 'poll' comment should be 'wait'). We've got
to figure a way to change this to polling only when NXLIB
is linked. This is because the X server operates just a little
differently with regards to exactly how a client waits on
an X event, which forces nano-X to poll here, as you've coded it.
(NXLIB issues a seperate select() so it's not always polling)
Regards,
Greg