From be1cbd46909e678bbd71f3a590e36c3077cb2960 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 22 Nov 2005 21:08:07 +0000 Subject: public setRootPixmap --- src/FbTk/FbPixmap.cc | 97 ++++++++++++++++++++++++++++------------------------ src/FbTk/FbPixmap.hh | 3 +- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc index ce28f0e..b8c2856 100644 --- a/src/FbTk/FbPixmap.cc +++ b/src/FbTk/FbPixmap.cc @@ -357,55 +357,62 @@ void FbPixmap::setRootPixmap(int screen_num, Pixmap pm) { } Pixmap FbPixmap::getRootPixmap(int screen_num) { - if (!FbTk::Transparent::haveRender()) - return None; - - if (!m_root_pixmaps) { - int numscreens = ScreenCount(display()); - for (int i=0; i < numscreens; ++i) { - Atom real_type; - int real_format; - unsigned long items_read, items_left; - unsigned long *data; - - 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" - " if you experience problems with transparency:\n" - " you are using a wallpapersetter that \n" - " uses _XSETROOT_ID .. which we do not support.\n" - " consult 'fbsetbg -i' or try any other wallpapersetter\n" - " that uses _XROOTPMAP_ID !\n" - " !!! WARNING WARNING WARNING WARNING !!!!!!\n\n" - }; - - Pixmap root_pm = None; - for (prop = 0; root_prop_ids[prop]; prop++) { - checkAtoms(); - if (XGetWindowProperty(display(), - RootWindow(display(), i), - root_prop_atoms[i], - 0l, 1l, - False, XA_PIXMAP, - &real_type, &real_format, - &items_read, &items_left, - (unsigned char **) &data) == Success) { - if (real_format == 32 && items_read == 1) { - if (print_error && strcmp(root_prop_ids[prop], "_XSETROOT_ID") == 0) { - cerr<