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 | |
parent | 6717a1c805529ea6e1b1c19a591f876c9c8803db (diff) | |
download | fluxbox-9cb78eaa3b7a588fea60830752689ecf8db5b16e.zip fluxbox-9cb78eaa3b7a588fea60830752689ecf8db5b16e.tar.bz2 |
reordering
-rw-r--r-- | src/FbTk/Shape.cc | 13 | ||||
-rw-r--r-- | src/FbTk/Shape.hh | 11 |
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 | ||
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 }; |
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 | |||
29 | namespace FbTk { | 27 | namespace FbTk { |
30 | class FbWindow; | 28 | class 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 |