Newsgroups: comp.windows.x.motif Path: utzoo!utgpu!watserv1!sparky!andrew From: andrew@sparky.uwaterloo.ca (Andrew MacLean) Subject: WM closing sub-top-level windows Message-ID: <1991Jun21.181233.2669@watserv1.waterloo.edu> Originator: andrew@sparky Sender: news@watserv1.waterloo.edu Organization: University of Waterloo Distribution: na Date: Fri, 21 Jun 1991 18:12:33 GMT Lines: 54 I am creating an X11 R3 client using the motif toolkit. This client will contain many top level widgets, each being independent of the other with the one main window. (ie: ---------- | | | main | | window | /-----------| |-----------\ | ---------- | | | | | | | | | | | | | ---------- ---------- ---------- | | | | | | | sub | | sub | | sub | | window | | window | | window | | | | | | | ---------- ---------- ---------- The problem that I am having is that since each is its own window, they each can be killed by the window manager using the pulldown menu option 'Quit window'. (Note. I am using the olwm, and am also therefore using the Open Look server on a Sparc 1+.) Is there any way (in R3) to have the window manager tell my main program that one of the sub-top-level windows has been closed? If there isn't, is there a way to remove the quit option from the window frame surrounding the sub-top-level window? Just to inform you of the options I have tried, I have tried the following: XtAddEventHandler(widget, StructureNotifyMask, False, destroy_proc, NULL); I tried this, because it apparently traps Destroy_Window events. Unfortunately it did not inform my procedure of the destroy request. Next I tried. XmAddProtocolCallback(widget, WM_DELETE_WINDOW, destroy_proc, NULL); yet after close examination of the manual, I reaslized that this is an option implemented in R4. Any help would be greatly appreciated. Thanks in advance. andrew -- Andrew MacLean Civil Engineering University of Waterloo andrew@sparky.uwaterloo.ca