Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!adobe!asente From: asente@adobe.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: Motif 1.1 problem with shells and XtRealize and XtUnrealize Message-ID: <16258@adobe.UUCP> Date: 10 Jun 91 19:21:11 GMT References: <33913@shamash.cdc.com> Sender: news@adobe.COM Organization: Adobe Systems Inc. Lines: 50 You seem to be rather confused... In article <33913@shamash.cdc.com> dka@mips.COM (d k adams x-2675) writes: > >HELP! DOES ANYONE KNOW OF A WORK AROUND FOR THE FOLLOWING PROBLEM? > >My application requires many windows to pop up in response to a selection from >a menu bar. The windows that are popped up are too complex to use a pop up >shell and XtPopup and XtPopdown. ( It is my understanding that a pop up shell >can only be the parent of one composite or simple widget. My pop up windows >are neither of these. ) There are several classes of shells, and all of them have the characteristic that they can only hold one *immediate* child. Normally you make the child be some kind of composite (a dialog box or form, typically) and put other widgets inside. The class of shell you use is primarily tied to how you want the window manager to treat the shell, not how your application treats it: popup shell: have the window manager ignore it (e.g. menus) transient shell: have the window manager treat the shell's window as a second-class citizen, subordinate to another window (whatever this means for your particular window manager) top level shell: have the window manager treat the shell's window as a full-fledged citizen of your screen (ditto) application shell: have the window manager (or session manager if appropriate) treat the shell's window as an application (ditto) Having more than one application shell on the same display is usually a mistake unless your application pretends to be multiple logical applications to the user. You can use XtPopup and XtPopdown on any class of shell. >My solution to get around this was to create all "pop >up" windows as children of topLevelShells or applicationShells. Then I could >Realize and Unrealize the shells as they were needed. This should work (modulo bugs) but it will be much slower than using XtPopup and XtPopdown. Or, since you're using Motif, use the managing/unmanaging style of control provided with Motif. -paul asente asente@adobe.com ...decwrl!adobe!asente Ratz put a bucket of liquid in front of me. "I wanted a glass of docs, Ratz. What the hell is this?" I barked. "Motif don't fit in a glass anymore," he barked back. I looked at the liquid. It was totally opaque to me.