diff options
Diffstat (limited to 'src/FbTk/FbPixmap.cc')
-rw-r--r-- | src/FbTk/FbPixmap.cc | 15 |
1 files changed, 10 insertions, 5 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 | ||
356 | void FbPixmap::rootwinPropertyNotify(int screen_num, Atom atom) { | 356 | // returns whether or not the background was changed |
357 | bool 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 | ||
389 | void FbPixmap::setRootPixmap(int screen_num, Pixmap pm) { | 391 | // returns whether or not the background was changed |
392 | bool 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 | ||
402 | Pixmap FbPixmap::getRootPixmap(int screen_num, bool force_update) { | 407 | Pixmap FbPixmap::getRootPixmap(int screen_num, bool force_update) { |