public setRootPixmap
This commit is contained in:
parent
b131f3a8af
commit
be1cbd4690
2 changed files with 50 additions and 42 deletions
|
@ -357,10 +357,16 @@ void FbPixmap::setRootPixmap(int screen_num, Pixmap pm) {
|
|||
}
|
||||
|
||||
Pixmap FbPixmap::getRootPixmap(int screen_num) {
|
||||
/*
|
||||
if (!FbTk::Transparent::haveRender())
|
||||
return None;
|
||||
*/
|
||||
|
||||
if (!m_root_pixmaps) {
|
||||
// check and see if if we have the pixmaps in cache
|
||||
if (m_root_pixmaps)
|
||||
return m_root_pixmaps[screen_num];
|
||||
|
||||
// else setup pixmap cache
|
||||
int numscreens = ScreenCount(display());
|
||||
for (int i=0; i < numscreens; ++i) {
|
||||
Atom real_type;
|
||||
|
@ -371,7 +377,8 @@ Pixmap FbPixmap::getRootPixmap(int screen_num) {
|
|||
unsigned int prop = 0;
|
||||
|
||||
static bool print_error = true; // print error_message only once
|
||||
static const char* error_message = { "\n\n !!! WARNING WARNING WARNING WARNING !!!!!\n"
|
||||
static const char* error_message = {
|
||||
"\n\n !!! WARNING WARNING WARNING WARNING !!!!!\n"
|
||||
" if you experience problems with transparency:\n"
|
||||
" you are using a wallpapersetter that \n"
|
||||
" uses _XSETROOT_ID .. which we do not support.\n"
|
||||
|
@ -405,7 +412,7 @@ Pixmap FbPixmap::getRootPixmap(int screen_num) {
|
|||
}
|
||||
setRootPixmap(i, root_pm);
|
||||
}
|
||||
}
|
||||
|
||||
return m_root_pixmaps[screen_num];
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ public:
|
|||
inline int depth() const { return m_depth; }
|
||||
|
||||
static Pixmap getRootPixmap(int screen_num);
|
||||
static void setRootPixmap(int screen_num, Pixmap pm);
|
||||
static void rootwinPropertyNotify(int screen_num, Atom atom);
|
||||
|
||||
void create(Drawable src,
|
||||
|
@ -83,7 +84,7 @@ private:
|
|||
|
||||
/// Functions relating to the maintenance of root window pixmap caching
|
||||
static void checkAtoms();
|
||||
static void setRootPixmap(int screen_num, Pixmap pm);
|
||||
|
||||
// array of pixmaps: 1 per screen
|
||||
static Pixmap *m_root_pixmaps;
|
||||
static const char *root_prop_ids[];
|
||||
|
|
Loading…
Reference in a new issue