Article View: comp.windows.x
Article #23770Re: icons and twm.
From: der Mouse
Date: Mon, 17 Jun 1991 03:24
Date: Mon, 17 Jun 1991 03:24
51 lines
2447 bytes
2447 bytes
> If I use XSetStandardProperties and specify an icon to window > manager, the icon can not be destroyed. In other words, if I > XFreePixmap(my icon) after setting the standard properties, the > window manager looses the icon. (That is a rather amusing image, the icon going wandering all over the screen instead of staying put...I'll assume you meant "loses".) First, you have a bit of trouble setting up the icon pixmap. It's not, as the name implies, truly an icon pixmap; it's really an icon bitmap. You shouldn't be doing icon_pix = XCreatePixmapFromBitmapData(disp,RootWindow(disp,scrn), icon_bits,icon_width,icon_height,BlackPixel(disp,scrn), WhitePixel(disp,scrn),DefaultDepth(disp,scrn)); instead, you should be doing something like icon_pix = XCreatePixmapFromBitmapData(disp,RootWindow(disp,scrn), icon_bits,icon_width,icon_height,1L,0L,1); Read the ICCCM, section 4.1.2.4; in particular, it says The icon_pixmap field may specify a pixmap to be used as an icon. This pixmap should be: o One of the sizes specified in the WM_ICON_SIZE property on the root, if it exists (see Section 4.1.3.2). o 1-bit deep. The window manager will select, through the defaults database, suitable background (for the 0 bits) and foreground (for the 1 bits) colors. But that is presumably not your problem, since your icon pixmap is getting used. However, why would you think you should be able to destroy the icon pixmap to begin with? I don't see anything that gives this impression; I may just not have looked in the right place.... > I'v included a test program. If you try to iconify, you'll get my > icon. But if you uncomment line 132, and try to iconify, you'll get > no icon at all!. This seems like a bug; the window manager should be robust in the face of a nonexistent pixmap in the icon-pixmap field.... der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu
Technical Details
Message-ID:
<9106170324.AA28170@lightning.McRCIM.McGill.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-linesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: icons and twm. Message-ID: <9106170324.AA28170@lightning.McRCIM.McGill.EDU> Date: 17 Jun 91 03:24:42 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 51