[comp.windows.x.motif] Changing ICON PIXMAP under MWM.

nmm@cl.cam.ac.uk (Nick Maclaren) (09/18/90)

< I am running Ultrix 4.0 on a DECstation and when I am using DEC dxwm
< the Icon Pixmap can be changed. 
< But using Motif mwm it don't work.

I don't know how you are doing it, but it certainly can be done under mwm
(I do it).  However, the obvious methods don't work, and you have to
write some mildly perverse code.  There were a LOT of bugs in this area
with hpwm, and some of them may have crept through to mwm; I copied my
working hpwm code to mwm, so I cannot say.

I read the pixmap file name as an option (or a resource), AS A STRING,
decode it using XReadBitmapFile and then set the XtNiconPixmap resource
on the shell widget.  XCreateBitmapFromData also works.

If you want to change the icon pixmap using the 'obvious' resource,
you must do it in .Xdefaults or /usr/lib/X11/app-defaults/Mwm.
/usr/lib/X11/app-defaults/Your-application has no effect.

Nick Maclaren
University of Cambridge Computer Laboratory
nmm@cl.cam.ac.uk