Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!boulder!stan!toml From: toml@Solbourne.COM (Tom LaStrange) Newsgroups: comp.windows.x Subject: Re: Simple programming quiz Message-ID: <1493@imelda.Solbourne.COM> Date: 20 Jun 89 15:39:14 GMT References: <5253@pt.cs.cmu.edu> Organization: Solbourne Computer Inc., Longmont, Co. Lines: 26 From article <5253@pt.cs.cmu.edu>, by egc@pie1.mach.cs.cmu.edu (eddie caplan): >In article <188@mirsa.inria.fr> colas@mirsa.inria.fr (Colas NAHABOO) writes: > >All well-written (i.e working) programs on X MUST be event driven. > >i hope that you're joking. i can think of X programs which just graphically >display data without taking any significant user input. if you are suggesting >that X11 can't properly handle such programs then its time for X11 to pack its >bags and let a real windowing system become the standard. Sure, you can write a program that pops up a window and starts drawing, but what happens when the window becomes obscured and then unobscured? If you always want your picture to be displayed correctly, you will either have to put your program in a loop which continuously redraws your graphics even though nothing may have changed, or you can at least handle an Expose event in addition to waking up and doing something once in a while. Two good examples of this are xclock and xload. Your X programs don't HAVE to be event driven, it just makes them more efficient, i.e. "well-written". -- Tom LaStrange Solbourne Computer Inc. ARPA: toml@Solbourne.COM 1900 Pike Rd. UUCP: ...!{boulder,nbires,sun}!stan!toml Longmont, CO 80501