Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!sri-unix!rutgers!lll-lcc!ames!ucbcad!ucbvax!DECWRL.DEC.COM!hania
From: hania@DECWRL.DEC.COM
Newsgroups: comp.windows.x
Subject: Re: Jordie needs help again.
Message-ID: <8712060611.AA22757@gilroy.dec.com>
Date: Sun, 6-Dec-87 01:31:14 EST
Article-I.D.: gilroy.8712060611.AA22757
Posted: Sun Dec  6 01:31:14 1987
Date-Received: Thu, 10-Dec-87 23:07:17 EST
References: <8712060524.AA05939@violet.berkeley.edu>
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 21

> To sum up what I want to do:
>
> I want to detect whenever a window is mapped/destroyed/configured at the root
> level (for non-title bar mode and icons).
>
> I want to reparent a window at will and still get this information,	
> but now relative to the title bar "frame" window.
>
> What should I select and on whom?

To get notified of the destruction of reparented windows you should
select for SubstructureNotify on the window that the client window has
been reparented to.  After being reparented, the client window becomes
a subwindow of the uwm-created window, hence the "Sub"structure.

To get notified of the destruction of non-reparented client windows
(children of the root), you should select for SubstructureNotify on the root.

Hope this is clear.  Look at wm for an example of code that does the  first part.

   Hania