diff options
-rw-r--r-- | src/FbTk/Transparent.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/FbTk/Transparent.cc b/src/FbTk/Transparent.cc index e43c005..152e2a4 100644 --- a/src/FbTk/Transparent.cc +++ b/src/FbTk/Transparent.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Transparent.cc,v 1.2 2003/04/20 14:47:35 fluxgen Exp $ | 22 | // $Id: Transparent.cc,v 1.3 2003/04/26 12:44:24 fluxgen Exp $ |
23 | 23 | ||
24 | #include "Transparent.hh" | 24 | #include "Transparent.hh" |
25 | #include "App.hh" | 25 | #include "App.hh" |
@@ -173,7 +173,9 @@ void Transparent::setSource(Drawable source, int screen_num) { | |||
173 | #ifdef HAVE_XRENDER | 173 | #ifdef HAVE_XRENDER |
174 | if (m_source == source) | 174 | if (m_source == source) |
175 | return; | 175 | return; |
176 | 176 | // save old alpha value so we can recreate new later | |
177 | // with the same value | ||
178 | unsigned char old_alpha = m_alpha; | ||
177 | if (m_alpha_pic != 0) | 179 | if (m_alpha_pic != 0) |
178 | freeAlpha(); | 180 | freeAlpha(); |
179 | 181 | ||
@@ -185,7 +187,6 @@ void Transparent::setSource(Drawable source, int screen_num) { | |||
185 | } | 187 | } |
186 | 188 | ||
187 | m_source = source; | 189 | m_source = source; |
188 | allocAlpha(m_alpha); | ||
189 | 190 | ||
190 | // create new source pic if we have a valid source drawable | 191 | // create new source pic if we have a valid source drawable |
191 | if (m_source != 0) { | 192 | if (m_source != 0) { |
@@ -198,6 +199,10 @@ void Transparent::setSource(Drawable source, int screen_num) { | |||
198 | m_src_pic = XRenderCreatePicture(disp, m_source, format, | 199 | m_src_pic = XRenderCreatePicture(disp, m_source, format, |
199 | 0, 0); | 200 | 0, 0); |
200 | } | 201 | } |
202 | |||
203 | // recreate new alpha | ||
204 | allocAlpha(old_alpha); | ||
205 | |||
201 | #endif // HAVE_XRENDER | 206 | #endif // HAVE_XRENDER |
202 | } | 207 | } |
203 | 208 | ||