Egbert Eich
Sun, 21 Sep 2003 09:09:52 -0700
Keith Packard writes: > Around 20 o'clock on Sep 20, Ivan Pascal wrote: > > > The solution is obvious. WaitForSomething should not run any callbacks before > > the Select but just check timers and if there are expired timers call select > > with a zero timeout. Also the code before the select checks screensaver and > > DPMS timeouts. > > One use for timeouts is to handle external network events, such as font > server reconnect or XDMCP messages. In those cases, the timeout routine > can modify which sockets will be needed in the select mask, hence the > desire for the timeout routine to execute before the select (and various > BlockHandler) routines are invoked. When the timeout routine fires only > after select returns, the server will go through a complete scheduling > interval before the BlockHandler is invoked. > So what would be the way out? I suppose one could use a wakeup handler instead. This however would only work if the wakeup handler for keyboard input was called before the xkb timer handler. The latencies of other handlers that are called before the xkb handler could also cause the timer to expire with the key release unnoticed. The only way to ensure that a possible release event is detected is to read the keyboard in the xkb callback handler to check for pending release events. However I'm afraid xkb simply doesn't work that way. Another solution may be a a SIGIO driven keyboard input. > > Also the code before the select checks screensaver and DPMS timeouts. I > > don't see reason why those timeouts are processed separately from timers > > and don't use timers facility. > > ScreenSavers used to be the only timeout and were coded before the general > timeout mechanism was added; DPMS was kludged in on top of that mechanism. > When the general timeout mechanism was added, the screen saver/DPMS code > should have been migrated over. > Yes, Ivan's patch fixed that. Egbert. _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel