Path: utzoo!attcan!uunet!lll-winken!ames!think!bloom-beacon!ATHENA.MIT.EDU!kit From: kit@ATHENA.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: top level shell widget Message-ID: <8902070007.AA23664@DORA.MIT.EDU> Date: 7 Feb 89 00:07:21 GMT References: <208@umigw.MIAMI.EDU> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 22 > Given an arbitrary widget, how does a program find out to which toplevel > shell widget that widget belongs to? Here is the only method that I can think of: Go up the tree using XtParent() checking each widget to see if it is a subclass of the shellWidgetClass using XtIsSubclass(). This should do the trick. NOTE: You can not check to see if its parent is NULL since popup shells will have valid parents. Chris D. Peterson MIT X Consortium / Project Athena Net: kit@athena.mit.edu Phone: (617) 253 - 1326 USMail: MIT - Room E40-321 77 Massachusetts Ave. Cambridge, MA 02139