Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!oliveb!amdahl!JUTS!duts!gjf00 From: gjf00@duts.ccc.amdahl.com (Gordon Freedman) Newsgroups: comp.windows.x.motif Subject: Re: Deiconifying a top level Message-ID: <64Nq02SR06tE01@JUTS.ccc.amdahl.com> Date: 1 Apr 91 18:09:40 GMT References: <12342@ibism.uucp> Sender: netnews@ccc.amdahl.com Reply-To: gjf00@DUTS.ccc.amdahl.com (Gordon Freedman) Organization: Amdahl Corporation, Sunnyvale CA Lines: 66 In article <12342@ibism.uucp> lcp@ibism.UUCP (Larry Poleshuck) writes: >Can anyone tell me how to force mwm to deiconify a TopLevel widget in my application which has been iconified? Specifically, my applictation has several topLevel widgets and there are times when I want to deiconify certain widgets. I tried setting the i >confy attribute of the toplevel, but that appears to be used only for initial state. I've been told I need to send a client message to mwm but can't figure out how to do this? > >Any help would be appreciated. > >-- > >Larry Poleshuck >Citibank >111 Wall Street >New York, NY 10043 > >Phone: 212-657-7709 >Fax: 212-825-8607 >E-Mail: uunet!ibism!lcp Try this: -------------------------------------------------------------------------------- static Widget topLogon ; static Widget topLevel ; main() { topLevel = XtInitialize(argv[0], class, NULL, 0, &argc, argv); topLogon = XtCreateApplicationShell ("Xapp", topLevelShellWidgetClass, 0, 0) ; /* Do more stuff, presumably to put widgets in topLogon */ XtRealizeWidget (topLogon) ; } /* Sometime later after topLogon realized and iconified this is called */ /* It won't hurt anything if topLogon is already deiconified ... */ /* I don't know what will happen if topLogon is not realized ... */ void logonMap (w, client, call) Widget w ; void * client ; void * call ; { XMapWindow (XtDisplay (topLogon), XtWindow (topLogon)) ; } -------------------------------------------------------------------------------- XMapWindow is probably all I needed to tell you, I hope this clarifies it. I think I first saw this in the FAQ in comp.windows.x, there's lots of useful stuff there (as there is in the comp.windows.x.motif FAQ). This probably works for the topLevel widget too, but I haven't tried it with that one. (I only included it in the example so you wouldn't think I was crazy not doing XtInitialize). Hope this helps -- Gordon Freedman: gjf00@duts.ccc.amdahl.com Disclaimer: My opinions! Not my employers!