Article View: comp.windows.interviews
Article #591Re: Session::read_nonevent ()
From: Mark Linton
Date: Fri, 04 Sep 1992 16:30
Date: Fri, 04 Sep 1992 16:30
20 lines
1254 bytes
1254 bytes
In article <1992Sep3.172723.29504@u.washington.edu>, donn@carson.u.washington.edu (Donn Cave) writes:
|> I find that InterViews 3.0.1 applications that use additional input units
|> via the Dispatcher, need to process an actual X event before Session::read()
|> will return. For applications that use a simple loop of the form
|> for (;;) {
|> Session::read(Event&);
|> Event::handle();
|> ... // do stuff, but you'll have to twitch the mouse before
|> // I can get here after a callback from an alternate unit.
|> }
Seems like
for (;;) {
Dispatcher::instance().dispatch();
// do stuff
}
is what you want for your main loop. Note that when dispatch
finds one or more X events, it will end up calling Event::handle.
Technical Details
Message-ID:
<peam4ok@fido.asd.sgi.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!tymix!tardis!olivea!sgigate!odin!fido!marktwain.rad.sgi.com!lintonReferences:
<1992Sep3.172723.29504@u.washington.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!tymix!tardis!olivea!sgigate!odin!fido!marktwain.rad.sgi.com!linton From: linton@marktwain.rad.sgi.com (Mark Linton) Newsgroups: comp.windows.interviews Subject: Re: Session::read_nonevent () Message-ID: <peam4ok@fido.asd.sgi.com> Date: 4 Sep 92 16:30:01 GMT References: <1992Sep3.172723.29504@u.washington.edu> Sender: news@fido.asd.sgi.com (Usenet News Admin) Reply-To: linton@marktwain.rad.sgi.com (Mark Linton) Organization: sgi Lines: 20