Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!shearson.com!newshost!malbert From: malbert@jeeves.shearson.com (Marc Albert) Newsgroups: comp.windows.x Subject: Event Loops Message-ID: Date: 12 Apr 91 17:53:41 GMT Sender: news@shearson.com (News) Distribution: na Organization: Lehman Brothers Lines: 26 I have an application that has multiple top level windows. The event loop looks something like this: for (;;) { if (XtAppPending(WindowOne)) XtDispatch(); if (XtAppPending(WindowTwo)) XtDispatch(); } This method works fine. The only problem I have is that I have to poll for events; this means I am never really waiting (blocking) and I am burning a lot of CPU. Is there a better method. The only thing I can think of is to create two separate executables - I don't want to have to do that. Any suggestions would be welcome. Thanks. Marc. return address ...uunet!shearson.com!malbert MA Bell: (212) 464-3061