Re: Drawing into icon

bullestock@dk-online.dk
Wed, 8 Jan 1997 19:22:08 +0100

To subscribers of the xforms list from bullestock@dk-online.dk :

>>>>> "Steve" == Steve Lamont <spl@szechuan.ucsd.edu> writes:

Steve> To subscribers of the xforms list from spl@szechuan.ucsd.edu (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?

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

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

No, I'm displaying an animated arrow and two lines of text in the icon window.

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

Well, I tried both XGetWMHints and XSetWMHints. None work properly, at least
not with fvwm.

XForms developers: Is there any chance that we might get access to the top
level widget in the next release?

-Torsten http://www2.dk-online.dk/Users/Torsten_Martinsen