diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2008-01-28 07:41:42 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2008-01-28 07:41:42 (GMT) |
commit | 9cb78eaa3b7a588fea60830752689ecf8db5b16e (patch) | |
tree | 3a8fc816f990f4bd0291d32b989f0a41c11694a7 /src/FbTk/Shape.cc | |
parent | 6717a1c805529ea6e1b1c19a591f876c9c8803db (diff) | |
download | fluxbox_pavel-9cb78eaa3b7a588fea60830752689ecf8db5b16e.zip fluxbox_pavel-9cb78eaa3b7a588fea60830752689ecf8db5b16e.tar.bz2 |
reordering
Diffstat (limited to 'src/FbTk/Shape.cc')
-rw-r--r-- | src/FbTk/Shape.cc | 13 |
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 | ||
47 | using std::min; | 48 | using 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 | ||
96 | struct CornerPixmaps { | ||
97 | FbPixmap topleft; | ||
98 | FbPixmap topright; | ||
99 | FbPixmap botleft; | ||
100 | FbPixmap botright; | ||
95 | }; | 101 | }; |
96 | 102 | ||
97 | std::vector<Shape::CornerPixmaps> Shape::s_corners; | 103 | // unfortunately, we need a separate pixmap per screen |
104 | std::vector<CornerPixmaps> s_corners; | ||
105 | |||
106 | }; // end of anonymous namespace | ||
98 | 107 | ||
99 | Shape::Shape(FbWindow &win, int shapeplaces): | 108 | Shape::Shape(FbWindow &win, int shapeplaces): |
100 | m_win(&win), | 109 | m_win(&win), |
@@ -134,7 +143,7 @@ Shape::~Shape() { | |||
134 | void Shape::initCorners(int screen_num) { | 143 | void 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 }; |