Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!texbell!sugar!ficc!peter
From: peter@ficc.uu.net (Peter da Silva)
Newsgroups: comp.windows.x
Subject: Re: The problem of fitting your application into XtAppMainLoop.
Message-ID: <6349@ficc.uu.net>
Date: 28 Sep 89 16:24:46 GMT
References: <61@eileen.mga.com>
Organization: Xenix Support, FICC
Lines: 26

In article <61@eileen.mga.com>, gjc@eileen.mga.com (George J. Carrette) writes:
> At first glance it is very difficult if not impossible in some
> applications to always return within a short time from procedures
> invoked by the XtAppAddWorkProc mechanism in the XtAppMainLoop.  (And
> indeed going to a WorkProc itself requires a callback to QUEUE some
> work rather than to try to complete the work while inside the
> callback).

Several months ago I argued that the X model of putting all the intelligence
in the application is a poor choice, because it forces you to recode an
X application into an event loop. There are window systems where the
server handles most of the dirty work. In Intuition, for instance, you
can set up a window such that any window manipulation short of a resize
request (moving windows, depth arranging, menus, and even toggle gadgets)
is handled without bothering the application. An application can safely
turn off resizing, put a sign up saying "I'm busy", and go away and do
real work.

The event-loop model is fine for programs that are essentially editors,
but it's not universally applicable. If it was, xterm would be a lot
less popular tool (:-> :-<).
-- 
Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation.
Biz: peter@ficc.uu.net, +1 713 274 5180. Fun: peter@sugar.hackercorp.com. `-_-'
"That is not the Usenet tradition, but it's a solidly-entrenched            U
 delusion now." -- brian@ucsd.Edu (Brian Kantor)