Maybe you're misinterpreting what is going on. The window with the "x" belongs to the window manager. When the window manager saw the click, it SEVERED the connection between the X-server and the owner of the child window the window manager was decorating. It did not close the app's window. It shut it out completely. As a result the server cleaned up resources left behind by the client, which would include the window. Events were sent to existing clients interested in that window, but the owner of that window was no longer a valid client at the point. In summary, the "x" doesn't close the window. It terminates the X-server's involvement with the associated client. You can install an Xlib error handler to get informed of the serverance, but all you can do in that function is clean up and prepare to exit, because Xlib will call exit() after your error handler gets called. Mark. On Sat, 5 Jun 2004 thunting@xxxxxxxxxxxxxx wrote: > Is there some way to intercept the close window command when a person > closes the window by clicking on the "x" in the right hand corner? > > I never get a DestroyNotify message and the rest of the program closes > with: > X connection to :0.0 broken (explicit kill or server shutdown). > > thanks > Ted > > > _______________________________________________ > XFree86 mailing list > XFree86@xxxxxxxxxxx > http://XFree86.Org/mailman/listinfo/xfree86 > _______________________________________________ XFree86 mailing list XFree86@xxxxxxxxxxx http://XFree86.Org/mailman/listinfo/xfree86