home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!elroy.jpl.nasa.gov!mahendo!thyme!kaleb
- From: kaleb@thyme.jpl.nasa.gov (Kaleb Keithley)
- Subject: Re: Kills from Window Manager
- Message-ID: <1992Jul24.221634.29882@thyme.jpl.nasa.gov>
- Organization: Jet Propulsion Laboratory, Pasadena, CA
- References: <1460adINN77b@early-bird.think.com> <1992Jul19.104259.6128@pictel.com> <1992Jul24.182835.29941@thunder.mcrcim.mcgill.edu>
- Date: Fri, 24 Jul 92 22:16:34 GMT
- Lines: 40
-
- In article mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
- >In article oj@pictel.com (Oliver Jones) writes:
- >> In article mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
- >>> operations, if any, I see no reason why it should bother
- >>> participating in WM_DELETE_WINDOW. ... Do you see any such reason?
- >
- >> Yes. If the wm uses XKillClient to get rid of the application, then
- >> the application's route to oblivion is through its XIO error handler.
- >> [...this produces a possibly disturbing error message...]
- >
- >So install an I/O error handler that exits quietly instead of printing
- >a noisy complaint first. (Or implement WM_DELETE_WINDOW, but the
- >
- >> If you're using Athena, it takes less than a dozen lines of code to
- >
- >Even in bare Xlib, the I/O error handler solution takes only two lines,
-
- IMHO, (which nobody asked for, but I'll offer it anyway) applications that
- don't participate in WM_DELETE_WINDOW are about on par with programs written
- as follows:
-
- void main () { ... }
-
- Yes, programs written with either error can and generally do work, but
- in my experience, these errors generally indicate that the programmer
- doesn't understand some of the finer details of C and/or X.
-
- Furthermore, writing your own IOErrorHandler function to trap the single
- error seems nearly equivalent to not checking return values from sytem
- calls. You might get by 99&44/100% of the time, but why risk it?
-
- Now, in looking at my preceding comments, I realize that someone might
- consider my comments to be mildly inflammatory. But let me assure you
- that they are *not* intended that way.
-
- --
-
- Kaleb Keithley kaleb@thyme.jpl.nasa.gov
-
- Not authorized, in any way, shape, or form, to speak for anyone.
-