Re: Background Image Proposal

Sasha_Vasko@osca.state.mo.us
Wed, 3 Mar 1999 14:01:52 -0600





Ethan Fischer wrote :
>On Wed, 3 Mar 1999, Rafal Wierzbicki wrote:

>> I think that asetroot is the better alternative for managing desktop

looks like I have not made one thing clear. So here is this again :

We have 6 possible scenarios of using Pager and Backgrounds :
1. No Pager, No Backgrounds
2. Pager, No backgrounds
3. Pager, single background
4. Pager, multiple background
5. No Pager, single background
6. No Pager, multiple backgrounds

I have absolutely nothing against Asetroot, but look here :
Using Asetroot makes sense only in scenarios 5 and 6.
In scenarios 3 and 4 we will end up with 2 modules running at the same time
:
Pager to provide desktop management, and Asetroot for the sole purpose
of background switching!
Background switching is a simple functionality that can fit in 100 lines of
code,
and to have that I'll need to run whole additional module, wasting my
memory and
CPU.
I'm telling you the truth - I would hate that. I would rather see this 100
lines
incorporated in to a Pager, as long as it's already monitoring Desk
changes.
But in this case I need those images to be loaded  into memory (only once).
The best way to do that is to run some prog on startup, that will set up X
properties with
image information.

Ok, if we don't want one more prog to do this - let's modify Asetroot, so
if it's run
not as a module - it will load all images into memory and set up those X
properties, and
possibly display first desk's image on screen.

>> backgrounds, it's a lot simpler, cleaner, there is no need for large
>> rewrites.  I'd rather see Pager moved to use mystyles with optional
>> support for grabbing the ROOT_PMAP or, as you suggested, AS_BG_DESK1
etc.

>I agree.  In fact, I don't see the point of making a new property for
>publishing what background goes with which desk.  The current technique

That is needed in order to let Pager know what image goes on which desk,
so it can scale them down and display in it's window.
That information can probably be stored in single property - as array of
values,
But here we see another problem, like providing image loading with external
prog,
in which case we'll need command line args instead of Pixmap ID to be
stored.

>in which only one module (Pager or asetroot) knows the mapping, and
>other apps watch _XROOTPMAP_ID for changes, seems to work well.

>Different backgrounds for each desktop is a good feature, imo.  A mapping
>between images and desks to prevent the same image from being loaded
>multiple times sounds good to me, although the configuration might be
>cumbersome.  I've been against using MyStyles for the desktop background,
>because that would require AfterStep itself to load the images - however,
>the MyStyle parsing code is still in asimagelib and could be used in,

Ok, My Style is not very good for this purpose as far as it contains lot's
of information,
that is absolutely unneeded for image processing : Back/Fore color, Font,
etc.
At the same time it has to be greately enchansed in order to provide all
those configuration
parameters that will allow for powerfull image processing - ie Scaling,
Centering, Clipping,
Shading , etc.

So the idea is to use another format of similar structure but different,
more powerfull contents.
That's how I came up with proposed file format.

>say, asetroot.  This would provide the inheritance.  A little care would
>have to be taken because asetroot uses XSetCloseDownMode(), but this
>sould be done.

>Ethan Fischer

Sasha