Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!avr From: avr@cs.purdue.EDU (Andrew V. Royappa) Newsgroups: comp.sys.sgi Subject: A file descriptor for polling the NeWS event queue ? Keywords: X server, NeWS server Message-ID: <14644@ector.cs.purdue.edu> Date: 17 May 91 16:31:50 GMT Sender: news@cs.purdue.EDU Organization: Department of Computer Science, Purdue University Lines: 27 Hi, I am writing an application that opens both X and NeWS windows (in one process). I wish to receive input events from both X and NeWS windows. Currently, the program sits in a busy loop polling both X and NeWS event queues, which degrades the application's performance tremendously. However, X provides a file descriptor for each display connection: a program can call select() on that descriptor to wait for events. If NeWS also provided such a file descriptor to test for input, the program could use select() to wait for both NeWS and X events, thus eliminating the busy wait. Can anyone tell me if such a file descriptor is used by NeWS programs, and if so, how a user can access it ? Assuming, of course, that it's not a static variable in some library, or something like that. I understand that there will be a merged NeWS/X server, or perhaps just a single X server, in the near future. However, we can't wait until then. Thanks very much for your time. Andrew V. Royappa avr@purdue.edu {decvax,ucbvax,pur-ee}!purdue!avr