Re: Drawing into icon

Steve Lamont (
Sun, 5 Jan 97 13:18:33 PST

To subscribers of the xforms list from (Steve Lamont) :

> With the help I got last time, I have succeded in getting my code to draw into
> the icon when it is iconified. The only problem is that the icon is only
> redrawn when I move the mouse into or out of the icon. I used to solve this by
> sending an Expose event to the icon window, like this:
> [...]
> where 'myshell' is returned by XtAppInitialize(). But with XForms I do not
> have access to neither the toplevel widget or the icon window.
> Any good ideas?

I don't know if this will work but you might try using XGetWMHints()
to get the icon window. Bear in mind that this may not work with all
window managers (if it works as all) -- it doesn't under tvtwm since
tvtwm uses a window list rather than icons.

It's not clear to me what you're doing to the icon. Are you actually
changing the Pixmap or just the label? If you're just changing the
label, you might want to use XSetWMIconName(). This works without any
fudging of expose events.

If you're changing the Pixmap itself, take a look at the XSetWMHints()
function. It allows you to set a Pixmap. I haven't tried this since
I run tvtwm and there is no icon Pixmap _per_se_ under it -- just a
clickable list of windows.

Hope this helps.