[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Transparency -- take 2
From:       Geert Jansen <g.t.jansen () stud ! tue ! nl>
Date:       1999-10-02 9:37:38
[Download RAW message or body]

Antonio Larrosa wrote:
 
> This was intended and the current solution can be easily adapted to read
> this
> pixmap from the root window properties instead of generating it itself
> just
> by changing a pair of functions. Consider this instead of rewriting the
> whole
> classes please.

To do this, you'd have to change kdesktop so that it keeps the pixmaps
around. This is what I was mostly talking about. Currently it does not do
that.

> Currently you just have to use the class RootPixmap (defined in
> rootBg.h)
> and set a call to RootPixmap::setBackgroundPixmap(yourwidget); not much
> more.
> You just have to change the function loadWallpaper to load it from
> the root propierties instead of from disk.

Well, if you strip all the rendering code from RootPixmap, you end up with
about 20 lines (in my version) of C++ for copying the shared pixmap :) So
the duplication effort is not that big :) And I did a general pixmap sharing
class which is IMO preferable over your desktop-background-only version. 
It has a similar API. Something like:

QPixmap background = KSharedPixmap::copy("kde_desktop_1", aRect);

will get you a copy of the desired piece of the desktop background.
If you want to take a look at the code, I'll mail it to you, it's already
done.

> The major changes should be done to kdesktop, which is a thing I won't
> talk about as there are others who know much more than me about it.

Yes, I was primarily talking about kdesktop. If the changes are done there,
the client implementation is easy.

Greetings,
 
> Reuse what's already written :-)

Hey, that's my slogan! (really) :)

Greetings,
-- 
    Geert Jansen                       email: <g.t.jansen at stud.tue.nl>
    Phylosopher, Physicist                        PGP key ID: 0xD2B5E7CE

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic