aboutsummaryrefslogtreecommitdiff
path: root/src
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
parent6717a1c805529ea6e1b1c19a591f876c9c8803db (diff)
downloadfluxbox_pavel-9cb78eaa3b7a588fea60830752689ecf8db5b16e.zip
fluxbox_pavel-9cb78eaa3b7a588fea60830752689ecf8db5b16e.tar.bz2
reordering
Diffstat (limited to 'src')
-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