summaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/FbPixmap.cc15
-rw-r--r--src/FbTk/FbPixmap.hh4
2 files changed, 12 insertions, 7 deletions
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index 75dfe34..9143232 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -353,9 +353,10 @@ Pixmap FbPixmap::release() {
353 return ret; 353 return ret;
354} 354}
355 355
356void FbPixmap::rootwinPropertyNotify(int screen_num, Atom atom) { 356// returns whether or not the background was changed
357bool FbPixmap::rootwinPropertyNotify(int screen_num, Atom atom) {
357 if (!FbTk::Transparent::haveRender()) 358 if (!FbTk::Transparent::haveRender())
358 return; 359 return false;
359 360
360 checkAtoms(); 361 checkAtoms();
361 for (int i=0; root_prop_ids[i] != 0; ++i) { 362 for (int i=0; root_prop_ids[i] != 0; ++i) {
@@ -379,14 +380,16 @@ void FbPixmap::rootwinPropertyNotify(int screen_num, Atom atom) {
379 } 380 }
380 XFree(data); 381 XFree(data);
381 if (root_pm != None) 382 if (root_pm != None)
382 setRootPixmap(screen_num, root_pm); 383 return setRootPixmap(screen_num, root_pm);
383 } 384 }
384 break; 385 return false;
385 } 386 }
386 } 387 }
388 return false;
387} 389}
388 390
389void FbPixmap::setRootPixmap(int screen_num, Pixmap pm) { 391// returns whether or not the background was changed
392bool FbPixmap::setRootPixmap(int screen_num, Pixmap pm) {
390 if (!m_root_pixmaps) { 393 if (!m_root_pixmaps) {
391 m_root_pixmaps = new Pixmap[ScreenCount(display())]; 394 m_root_pixmaps = new Pixmap[ScreenCount(display())];
392 for (int i=0; i < ScreenCount(display()); ++i) 395 for (int i=0; i < ScreenCount(display()); ++i)
@@ -396,7 +399,9 @@ void FbPixmap::setRootPixmap(int screen_num, Pixmap pm) {
396 if (m_root_pixmaps[screen_num] != pm) { 399 if (m_root_pixmaps[screen_num] != pm) {
397 m_root_pixmaps[screen_num] = pm; 400 m_root_pixmaps[screen_num] = pm;
398 FbWindow::updatedAlphaBackground(screen_num); 401 FbWindow::updatedAlphaBackground(screen_num);
402 return true;
399 } 403 }
404 return false;
400} 405}
401 406
402Pixmap FbPixmap::getRootPixmap(int screen_num, bool force_update) { 407Pixmap FbPixmap::getRootPixmap(int screen_num, bool force_update) {
diff --git a/src/FbTk/FbPixmap.hh b/src/FbTk/FbPixmap.hh
index dab364a..acae07e 100644
--- a/src/FbTk/FbPixmap.hh
+++ b/src/FbTk/FbPixmap.hh
@@ -70,8 +70,8 @@ public:
70 inline unsigned int depth() const { return m_depth; } 70 inline unsigned int depth() const { return m_depth; }
71 71
72 static Pixmap getRootPixmap(int screen_num, bool force_update=false); 72 static Pixmap getRootPixmap(int screen_num, bool force_update=false);
73 static void setRootPixmap(int screen_num, Pixmap pm); 73 static bool setRootPixmap(int screen_num, Pixmap pm);
74 static void rootwinPropertyNotify(int screen_num, Atom atom); 74 static bool rootwinPropertyNotify(int screen_num, Atom atom);
75 75
76 void create(Drawable src, 76 void create(Drawable src,
77 unsigned int width, unsigned int height, 77 unsigned int width, unsigned int height,