Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ub4b!kulcs!kulesat!esat!vyncke From: vyncke@esat.kuleuven.ac.be Newsgroups: comp.windows.x Subject: again : avoiding event loops Message-ID: <2998.26663bc7@esat.kuleuven.ac.be> Date: 1 Jun 90 09:56:23 GMT Organization: Katholieke Universiteit Leuven,ESAT - dep. Elect. Engineering, Belgium Lines: 21 I'm writing an application where the graphical interface is not the main part of the program. Since I want my windows to be updated after expose events, I need a kind of asynchrounous behaviour. I first build the program on a VAX station 3100 and there I had a routine called XSelectAsyncInput(...) . This worked fine. But two months ago I switched to a Sun Sparc with X11R4. There I tried to catch the events in a background process. This however was not failsafe. Now I implemented the method of John Bruner : > My approach is to get the file descriptor for the X server (with > ConnectionNumber(display)) and catch SIGIO. This works fine but there is still one problem : If I catch an interrupt when I'm in a X-call, my programm crashes. I worked around this by postponing the interrupt handling while I'm doing X-calls. This is however elaborate, and I'm wondering if there is not an other way to prevent the Xserver from receiving two concurrent X-calls Please send any reply by Email -- Frank Vyncke . Department of Robot Vision, KU Leuven, Belgium vyncke@esat.kuleuven.ac.be