[comp.windows.x] Some Help Please

hallett@enterprise.positron.gemed.ge.com (Jeff Hallett x5163 ) (08/15/90)

Hi there.

First of all, to summarize my previous request regarding installing a
background picture it seems that xloadimage is the overwhelming
favorite.

Now, for a couple of more questions:

1.  I use xv_set(myFrame, FRAME_ICON, theIcon, 0) to change a base
frame's icon during execution (basically, there is a long computation
occurring - I set a timer to go off, change the icon with another one
and then go on).  The effect I want to create is something like the
mailtool except loop between a few icons to keep the user up to date
even if the frame is iconified.  However, the call to xv_set doesn't
seem to take effect once the frame has been rendered.

2.  Does anyone have the sources to xlock?  I would like to add some
more graphics displays to it. (A good way to learn X11 bitmap
manipulations...fun too) .

Again, please email me and I will summarize.

Thanks.

--
	     Jeffrey A. Hallett, PET Software Engineering
      GE Medical Systems, W641, PO Box 414, Milwaukee, WI  53201
	    (414) 548-5163 : EMAIL -  hallettJ@gemed.ge.com
	     "Keep that sense of humor.  It's critical."

mlandau@bbn.com (Matthew Landau) (08/16/90)

hallett@enterprise.positron.gemed.ge.com (Jeff Hallett x5163	) writes:
>1.  I use xv_set(myFrame, FRAME_ICON, theIcon, 0) to change a base
>frame's icon during execution (basically, there is a long computation
>occurring - I set a timer to go off, change the icon with another one
>and then go on).  The effect I want to create is something like the
>mailtool except loop between a few icons to keep the user up to date
>even if the frame is iconified.  However, the call to xv_set doesn't
>seem to take effect once the frame has been rendered.

This is a known olwm bug -- olwm doesn't notice when icon pixmaps change 
for a mapped window.  In fact, it reads WM_HINTS only when a window comes 
out of Withdrawn state, so changing the hints on an already mapped window 
is a no-op.

Note that this is perfectly permissible behavior according to the ICCCM,
but it does fly in the face of what users and programmers expect.  I've
reported the bug to the author of olwm at Sun, and he agrees that the
current behavior is a bad idea, and should be fixed in the next release.

In XView 2.0, however, the window manager DOES notice changes in icon 
name, so if you change your icon name as well as icon pixmap, the user 
will at least have SOME indication of a change in program state.

smarks@eng.sun.COM (Stuart Marks, There go I but for the grace of Root) (08/16/90)

hallett@enterprise.positron.gemed.ge.com (Jeff Hallett x5163	) writes:
| 1.  I use xv_set(myFrame, FRAME_ICON, theIcon, 0) to change a base
| frame's icon during execution (basically, there is a long computation
| occurring - I set a timer to go off, change the icon with another one
| and then go on).  The effect I want to create is something like the
| mailtool except loop between a few icons to keep the user up to date
| even if the frame is iconified.  However, the call to xv_set doesn't
| seem to take effect once the frame has been rendered.

mlandau@diamond.bbn.com (Matthew Landau) writes:
| This is a known olwm bug -- olwm doesn't notice when icon pixmaps change 
| for a mapped window.  In fact, it reads WM_HINTS only when a window comes 
| out of Withdrawn state, so changing the hints on an already mapped window 
| is a no-op.

This is all true, but having olwm track changes to WM_HINTS wouldn't solve
this particular problem.  XView typically uses icon windows, not pixmaps;
if you switched icons by switching icon windows, you'd get a lot of
undesirable reparenting.  So, instead of changing the icon window itself,
you can change the image that gets painted into it.  Something like:

	xv_set(theIcon, ICON_IMAGE, server_image, NULL);

should do the trick.

s'marks

Stuart W. Marks			ARPA: smarks@eng.sun.com
Window Systems Group		UUCP: sun!smarks
Sun Microsystems, Inc.