aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Transparent.hh
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-02-22 21:07:39 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-02-22 21:07:39 (GMT)
commitd11aa42ace928efc3dd1eebc8988b6bbbc005b2b (patch)
tree0574ed4eaa5092386d3cf5440c636ea586baaebe /src/FbTk/Transparent.hh
parentb7e84104a695bb3628e482c4be93f6f516e46e7d (diff)
downloadfluxbox-d11aa42ace928efc3dd1eebc8988b6bbbc005b2b.zip
fluxbox-d11aa42ace928efc3dd1eebc8988b6bbbc005b2b.tar.bz2
bugfix: consistent use of 'int' for alpha values (#3187373)
WindowMenuAccessor returned strange alpha values if compiled with 'g++ -Os'; unholy black magic happens if template<int> faces functions returning only 'usigned char'.
Diffstat (limited to 'src/FbTk/Transparent.hh')
-rw-r--r--src/FbTk/Transparent.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/FbTk/Transparent.hh b/src/FbTk/Transparent.hh
index 154c223..8e9d9b9 100644
--- a/src/FbTk/Transparent.hh
+++ b/src/FbTk/Transparent.hh
@@ -29,10 +29,10 @@ namespace FbTk {
29/// renders to drawable together with an alpha mask 29/// renders to drawable together with an alpha mask
30class Transparent { 30class Transparent {
31public: 31public:
32 Transparent(Drawable source, Drawable dest, unsigned char alpha, int screen_num); 32 Transparent(Drawable source, Drawable dest, int alpha, int screen_num);
33 ~Transparent(); 33 ~Transparent();
34 /// sets alpha value 34 /// sets alpha value
35 void setAlpha(unsigned char alpha); 35 void setAlpha(int alpha);
36 /// sets source drawable 36 /// sets source drawable
37 void setSource(Drawable src, int screen_num); 37 void setSource(Drawable src, int screen_num);
38 /// sets destination drawable 38 /// sets destination drawable
@@ -45,7 +45,7 @@ public:
45 int dest_x, int dest_y, 45 int dest_x, int dest_y,
46 unsigned int width, unsigned int height) const; 46 unsigned int width, unsigned int height) const;
47 47
48 unsigned char alpha() const { return m_alpha; } 48 int alpha() const { return m_alpha; }
49 Drawable dest() const { return m_dest; } 49 Drawable dest() const { return m_dest; }
50 Drawable source() const { return m_source; } 50 Drawable source() const { return m_source; }
51 51
@@ -55,7 +55,7 @@ public:
55 55
56private: 56private:
57 void freeAlpha(); 57 void freeAlpha();
58 void allocAlpha(unsigned char newval); 58 void allocAlpha(int newval);
59 unsigned long m_alpha_pic; 59 unsigned long m_alpha_pic;
60 unsigned long m_src_pic; 60 unsigned long m_src_pic;
61 unsigned long m_dest_pic; 61 unsigned long m_dest_pic;