diff options
author | fluxgen <fluxgen> | 2003-08-13 22:52:35 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-08-13 22:52:35 (GMT) |
commit | c14986b485f50dd659d027d7ea5d2ada336f3fec (patch) | |
tree | 5143c1c78ced427270a18c9fdbf68d0ad1336bca /src/Shape.cc | |
parent | 6daa8f95d63c31036a7e50f6b377099d225b249b (diff) | |
download | fluxbox-c14986b485f50dd659d027d7ea5d2ada336f3fec.zip fluxbox-c14986b485f50dd659d027d7ea5d2ada336f3fec.tar.bz2 |
fixed shape bug when changing between shaped and non shaped themes
Diffstat (limited to 'src/Shape.cc')
-rw-r--r-- | src/Shape.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/Shape.cc b/src/Shape.cc index 6ba9a6d..8954f3f 100644 --- a/src/Shape.cc +++ b/src/Shape.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Shape.cc,v 1.2 2003/07/10 14:47:53 fluxgen Exp $ | 22 | // $Id: Shape.cc,v 1.3 2003/08/13 22:52:35 fluxgen Exp $ |
23 | 23 | ||
24 | #include "Shape.hh" | 24 | #include "Shape.hh" |
25 | #include "FbWindow.hh" | 25 | #include "FbWindow.hh" |
@@ -144,6 +144,18 @@ Shape::Shape(FbTk::FbWindow &win, int shapeplaces): | |||
144 | Shape::~Shape() { | 144 | Shape::~Shape() { |
145 | if (m_shape != 0) | 145 | if (m_shape != 0) |
146 | XFreePixmap(FbTk::App::instance()->display(), m_shape); | 146 | XFreePixmap(FbTk::App::instance()->display(), m_shape); |
147 | |||
148 | #ifdef SHAPE | ||
149 | if (m_win != 0 && m_win->window()) { | ||
150 | // reset shape of window | ||
151 | XShapeCombineMask(FbTk::App::instance()->display(), | ||
152 | m_win->window(), | ||
153 | ShapeBounding, | ||
154 | 0, 0, | ||
155 | 0, | ||
156 | ShapeSet); | ||
157 | } | ||
158 | #endif // SHAPE | ||
147 | } | 159 | } |
148 | 160 | ||
149 | void Shape::setPlaces(int shapeplaces) { | 161 | void Shape::setPlaces(int shapeplaces) { |
@@ -164,9 +176,8 @@ void Shape::update() { | |||
164 | 176 | ||
165 | } | 177 | } |
166 | 178 | ||
167 | if (m_shape == 0) | 179 | // the m_shape can be = 0 which will just reset the shape mask |
168 | return; | 180 | // and make the window normal |
169 | |||
170 | XShapeCombineMask(FbTk::App::instance()->display(), | 181 | XShapeCombineMask(FbTk::App::instance()->display(), |
171 | m_win->window(), | 182 | m_win->window(), |
172 | ShapeBounding, | 183 | ShapeBounding, |