From 710ef5d3c94e82e0ec99ff95a8c09d7308f81a6e Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 24 Aug 2003 15:37:12 +0000 Subject: fixed isShaped and setShapeNotify --- src/Shape.cc | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Shape.cc b/src/Shape.cc index 8954f3f..efc47fd 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.3 2003/08/13 22:52:35 fluxgen Exp $ +// $Id: Shape.cc,v 1.4 2003/08/24 15:37:12 fluxgen Exp $ #include "Shape.hh" #include "FbWindow.hh" @@ -193,3 +193,29 @@ void Shape::setWindow(FbTk::FbWindow &win) { m_win = &win; update(); } + +void Shape::setShapeNotify(const FbTk::FbWindow &win) { +#ifdef SHAPE + XShapeSelectInput(FbTk::App::instance()->display(), + win.window(), ShapeNotifyMask); +#endif // SHAPE +} + +bool Shape::isShaped(const FbTk::FbWindow &win) { + int shaped = 0; + +#ifdef SHAPE + int not_used; + unsigned int not_used2; + XShapeQueryExtents(FbTk::App::instance()->display(), + win.window(), + &shaped, /// bShaped + ¬_used, ¬_used, // xbs, ybs + ¬_used2, ¬_used2, // wbs, hbs + ¬_used, // cShaped + ¬_used, ¬_used, // xcs, ycs + ¬_used2, ¬_used2); // wcs, hcs +#endif // SHAPE + + return (shaped != 0 ? true : false); +} -- cgit v0.11.2