[comp.windows.x.motif] Deiconifying a top level

lcp@ibism.UUCP (Larry Poleshuck) (03/30/91)

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 iconfy 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

gjf00@duts.ccc.amdahl.com (Gordon Freedman) (04/02/91)

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!

keith@hpcvlx.cv.hp.com (Keith Taylor) (04/02/91)

> Can anyone tell me how to force mwm to deiconify a TopLevel widget in my 
> application which has been iconified?

Try XMapWindow (or XMapRaised).


Keith M. Taylor		keith@cv.hp.com	
Hewlett-Packard
Corvallis, Oregon