aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Transparent.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2005-04-10 18:18:14 (GMT)
committersimonb <simonb>2005-04-10 18:18:14 (GMT)
commit88c66f0687d2a9e2018f22407b2587dc4d87d012 (patch)
tree197308ad2426783058f479d12329548c6a8a4374 /src/FbTk/Transparent.cc
parent6cf66c66554a20a1c98eddf26af9e35b7c90cbd5 (diff)
downloadfluxbox-88c66f0687d2a9e2018f22407b2587dc4d87d012.zip
fluxbox-88c66f0687d2a9e2018f22407b2587dc4d87d012.tar.bz2
Big changes to how transparency works
Consequently rearrange lots of rendering ops, and strip calls to updateTransparent
Diffstat (limited to 'src/FbTk/Transparent.cc')
-rw-r--r--src/FbTk/Transparent.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/FbTk/Transparent.cc b/src/FbTk/Transparent.cc
index 7c14849..39b0eff 100644
--- a/src/FbTk/Transparent.cc
+++ b/src/FbTk/Transparent.cc
@@ -206,6 +206,17 @@ void Transparent::setAlpha(unsigned char alpha) {
206 allocAlpha(alpha); 206 allocAlpha(alpha);
207} 207}
208 208
209void Transparent::freeDest() {
210#ifdef HAVE_XRENDER
211 if (m_dest_pic != 0) {
212 Display *disp = FbTk::App::instance()->display();
213 XRenderFreePicture(disp, m_dest_pic);
214 m_dest_pic = 0;
215 }
216 m_dest = None;
217#endif
218}
219
209void Transparent::setDest(Drawable dest, int screen_num) { 220void Transparent::setDest(Drawable dest, int screen_num) {
210#ifdef HAVE_XRENDER 221#ifdef HAVE_XRENDER
211 if (m_dest == dest || !s_render) 222 if (m_dest == dest || !s_render)
@@ -213,10 +224,7 @@ void Transparent::setDest(Drawable dest, int screen_num) {
213 224
214 Display *disp = FbTk::App::instance()->display(); 225 Display *disp = FbTk::App::instance()->display();
215 226
216 if (m_dest_pic != 0) { 227 freeDest();
217 XRenderFreePicture(disp, m_dest_pic);
218 m_dest_pic = 0;
219 }
220 // create new dest pic if we have a valid dest drawable 228 // create new dest pic if we have a valid dest drawable
221 if (dest != 0) { 229 if (dest != 0) {
222 230