[comp.windows.x] iconPixmap only works after XtRealize

tbray@watsol.waterloo.edu (Tim Bray) (01/09/91)

I have a toplevel widget created with XtInitialize in a standard way.  I also
have a nice default icon I'd like to use for the application.  I tried to set
this using the XtNiconPixmap resource.  Trouble is, it doesn't take unless I
do this AFTER the XtRealizeWidget() on the toplevel but of course before the
XtMainLoop().

Not a bug, just an irritation and some wasted time doping it out.  Is there 
something I'm missing?

Tim Bray
tbray@watsol.waterloo.edu

bobo@pecan15.cray.com (Bob Kierski) (01/11/91)

In article <1991Jan9.034150.1279@watdragon.waterloo.edu>, tbray@watsol.waterloo.edu (Tim Bray) writes:
|> I have a toplevel widget created with XtInitialize in a standard way.  I also
|> have a nice default icon I'd like to use for the application.  I tried to set
|> this using the XtNiconPixmap resource.  Trouble is, it doesn't take unless I
|> do this AFTER the XtRealizeWidget() on the toplevel but of course before the
|> XtMainLoop().
|> 
|> Not a bug, just an irritation and some wasted time doping it out.  Is there 
|> something I'm missing?

Yes...

I've got an application that does the same thing.  However I make the following
calls:

	XtToolkitInitialize();
	my_app_context=XtCreateApplicationContext();
	XtAppSetFallbackResources(my_app_context,Fallback_Resources);
	my_Display=XtOpenDisplay(...);

	   ... And so on...

	toplevel=XtAppCreateShell(...);

One of the Args of XtAppCreateShell() is the IconPixmap.

This has always worked for me.

	
--


Have a day,