Path: utzoo!utgpu!watserv1!watmath!att!rutgers!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!unify.COM!grp From: grp@unify.COM (Greg Pasquariello) Newsgroups: comp.windows.x.motif Subject: Re: Application Icons Message-ID: <9009201651.AA03775@magpie> Date: 20 Sep 90 16:51:10 GMT References: <9009201348.AA01313@hendrix.odi.com> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: uunet!unify.com!grp Distribution: inet Organization: The Internet Lines: 23 Bob Miner writes: > > I'm sure this has been discussed here before but I can't seem to find > any record of it. Does anyone have a working example of setting the > application icon from within the application? > > -kee > >In Motif, create a single plane bitmap of the proper size (usually 48x48, >but technically one should call XGetIconSizes to determine the sizes which >the window manager wants) and then set the XmNiconPixmap resource of your >application's shell widget. > One thing that is not immediately obvious (to me) but which is important, is the second paragraph of section 4.1.2 of the ICCCM. This paragraph indicates that certain properties of the window are examined by the window manager when the window is mapped. This recently bit me, as it means the icon stuff must be set before toplevel window is mapped. Hopefully the motif toolkit will work correctly, but if you use XSetWMHints instead, make sure the window is realized but not yet mapped. -Greg Pasquariello grp@unify.com