From c14986b485f50dd659d027d7ea5d2ada336f3fec Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 13 Aug 2003 22:52:35 +0000 Subject: fixed shape bug when changing between shaped and non shaped themes --- src/Shape.cc | 19 +++++++++++++++---- 1 file 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Shape.cc,v 1.2 2003/07/10 14:47:53 fluxgen Exp $ +// $Id: Shape.cc,v 1.3 2003/08/13 22:52:35 fluxgen Exp $ #include "Shape.hh" #include "FbWindow.hh" @@ -144,6 +144,18 @@ Shape::Shape(FbTk::FbWindow &win, int shapeplaces): Shape::~Shape() { if (m_shape != 0) XFreePixmap(FbTk::App::instance()->display(), m_shape); + +#ifdef SHAPE + if (m_win != 0 && m_win->window()) { + // reset shape of window + XShapeCombineMask(FbTk::App::instance()->display(), + m_win->window(), + ShapeBounding, + 0, 0, + 0, + ShapeSet); + } +#endif // SHAPE } void Shape::setPlaces(int shapeplaces) { @@ -164,9 +176,8 @@ void Shape::update() { } - if (m_shape == 0) - return; - + // the m_shape can be = 0 which will just reset the shape mask + // and make the window normal XShapeCombineMask(FbTk::App::instance()->display(), m_win->window(), ShapeBounding, -- cgit v0.11.2