all repos — fluxbox @ 13a98385f077d0a24dc1ce7fb9d75befed3a0be3

custom fork of the fluxbox windowmanager

bug in alpha value when setting new source
fluxgen fluxgen
commit

13a98385f077d0a24dc1ce7fb9d75befed3a0be3

parent

eb9b2363e3ea8601b09599d444a2486a904e39ac

1 files changed, 8 insertions(+), 3 deletions(-)

jump to
M src/FbTk/Transparent.ccsrc/FbTk/Transparent.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Transparent.cc,v 1.2 2003/04/20 14:47:35 fluxgen Exp $ +// $Id: Transparent.cc,v 1.3 2003/04/26 12:44:24 fluxgen Exp $ #include "Transparent.hh" #include "App.hh"

@@ -173,7 +173,9 @@ void Transparent::setSource(Drawable source, int screen_num) {

#ifdef HAVE_XRENDER if (m_source == source) return; - + // save old alpha value so we can recreate new later + // with the same value + unsigned char old_alpha = m_alpha; if (m_alpha_pic != 0) freeAlpha();

@@ -185,7 +187,6 @@ m_src_pic = 0;

} m_source = source; - allocAlpha(m_alpha); // create new source pic if we have a valid source drawable if (m_source != 0) {

@@ -198,6 +199,10 @@ cerr<<"Warning! FbTk::Transparent: Failed to find format for screen("<<screen_num<<")"<<endl;

m_src_pic = XRenderCreatePicture(disp, m_source, format, 0, 0); } + + // recreate new alpha + allocAlpha(old_alpha); + #endif // HAVE_XRENDER }