aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/Shape.cc13
-rw-r--r--src/FbTk/Shape.hh11
2 files changed, 11 insertions, 13 deletions
diff --git a/src/FbTk/Shape.cc b/src/FbTk/Shape.cc
index c8cfb46..251d4d4 100644
--- a/src/FbTk/Shape.cc
+++ b/src/FbTk/Shape.cc
@@ -43,6 +43,7 @@
43#endif // SHAPE 43#endif // SHAPE
44 44
45#include <algorithm> 45#include <algorithm>
46#include <vector>
46 47
47using std::min; 48using std::min;
48 49
@@ -92,9 +93,17 @@ Pixmap makePixmap(FbWindow &drawable, const unsigned char rows[]) {
92 return pm.release(); 93 return pm.release();
93} 94}
94 95
96struct CornerPixmaps {
97 FbPixmap topleft;
98 FbPixmap topright;
99 FbPixmap botleft;
100 FbPixmap botright;
95}; 101};
96 102
97std::vector<Shape::CornerPixmaps> Shape::s_corners; 103// unfortunately, we need a separate pixmap per screen
104std::vector<CornerPixmaps> s_corners;
105
106}; // end of anonymous namespace
98 107
99Shape::Shape(FbWindow &win, int shapeplaces): 108Shape::Shape(FbWindow &win, int shapeplaces):
100 m_win(&win), 109 m_win(&win),
@@ -134,7 +143,7 @@ Shape::~Shape() {
134void Shape::initCorners(int screen_num) { 143void Shape::initCorners(int screen_num) {
135 if (s_corners.size() == 0) 144 if (s_corners.size() == 0)
136 s_corners.resize(ScreenCount(App::instance()->display())); 145 s_corners.resize(ScreenCount(App::instance()->display()));
137 146
138 static const unsigned char left_bits[] = { 0xc0, 0xf8, 0xfc, 0xfe, 0xfe, 0xfe, 0xff, 0xff }; 147 static const unsigned char left_bits[] = { 0xc0, 0xf8, 0xfc, 0xfe, 0xfe, 0xfe, 0xff, 0xff };
139 static const unsigned char right_bits[] = { 0x03, 0x1f, 0x3f, 0x7f, 0x7f, 0x7f, 0xff, 0xff}; 148 static const unsigned char right_bits[] = { 0x03, 0x1f, 0x3f, 0x7f, 0x7f, 0x7f, 0xff, 0xff};
140 static const unsigned char bottom_left_bits[] = { 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfc, 0xf8, 0xc0 }; 149 static const unsigned char bottom_left_bits[] = { 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfc, 0xf8, 0xc0 };
diff --git a/src/FbTk/Shape.hh b/src/FbTk/Shape.hh
index 04382cf..3539959 100644
--- a/src/FbTk/Shape.hh
+++ b/src/FbTk/Shape.hh
@@ -24,8 +24,6 @@
24 24
25#include "FbPixmap.hh" 25#include "FbPixmap.hh"
26 26
27#include <vector>
28
29namespace FbTk { 27namespace FbTk {
30class FbWindow; 28class FbWindow;
31 29
@@ -67,17 +65,8 @@ private:
67 65
68 void initCorners(int screen_num); 66 void initCorners(int screen_num);
69 67
70 struct CornerPixmaps {
71 FbPixmap topleft;
72 FbPixmap topright;
73 FbPixmap botleft;
74 FbPixmap botright;
75 };
76 68
77 // unfortunately, we need a separate pixmap per screen
78 static std::vector<CornerPixmaps> s_corners;
79 int m_shapeplaces; ///< places to shape 69 int m_shapeplaces; ///< places to shape
80
81}; 70};
82 71
83}; // end namespace FbTk 72}; // end namespace FbTk