aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Shape.cc19
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):
144Shape::~Shape() { 144Shape::~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
149void Shape::setPlaces(int shapeplaces) { 161void 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,