aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Shape.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-01-28 07:41:42 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-01-28 07:41:42 (GMT)
commit9cb78eaa3b7a588fea60830752689ecf8db5b16e (patch)
tree3a8fc816f990f4bd0291d32b989f0a41c11694a7 /src/FbTk/Shape.cc
parent6717a1c805529ea6e1b1c19a591f876c9c8803db (diff)
downloadfluxbox-9cb78eaa3b7a588fea60830752689ecf8db5b16e.zip
fluxbox-9cb78eaa3b7a588fea60830752689ecf8db5b16e.tar.bz2
reordering
Diffstat (limited to 'src/FbTk/Shape.cc')
-rw-r--r--src/FbTk/Shape.cc13
1 files changed, 11 insertions, 2 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 };