Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!think!ames!sdcsvax!ucbvax!SUN.COM!dshr From: dshr@SUN.COM (David Rosenthal) Newsgroups: comp.windows.x Subject: window manager property semantics Message-ID: <8710122038.AA00363@devnull.sun.com> Date: Mon, 12-Oct-87 14:15:58 EDT Article-I.D.: devnull.8710122038.AA00363 Posted: Mon Oct 12 14:15:58 1987 Date-Received: Wed, 14-Oct-87 02:09:52 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 34 I strongly support Adam's note deprecating the use of properties as commands to the window manager to map and resize windows. The clinching argument (which Adam omitted) is that the use of properties in this way assumes infinitely reliable window managers. The use of a command-line argument, or a property on the root window, as a way of finding out if a window manager is running, is obviously bogus; it tells you either that the user thinks that a window manager is running, or that a window manager once ran. The way to do it is to examine the all-event-masks field returned by GetWindowAttributes. But using this means an extra round-trip on every window manipulation, and STILL leaves you with a window of vulnerability in which the window manager can vanish, and the application will do the wrong thing: GetWindowAttributes(&foo) /*Start Window of vulnerability */ if (foo.all_event_mask & (SubstructureRedirect|CreateNotify|...) { /*Window manager is running */ ChangeProperty() } else { /*No window manager*/ MapWindow() } /* End window of vulnerability */ Making all window manipulations look like this would be really intolerable. As I see it, the ONLY case in which an application should not explicitly size & map its window is the case of an application that wants to start iconinc, but does not have an icon window. The behaviour of iconic things that don't have a window is entirely up to the window manager, but I don't regard this as an argument for the application not sizing & mapping, it is rather an argument that if the application really wants to start iconic, it had better have an icon window (and size and map it ......). David.