fixed isShaped and setShapeNotify
fluxgen fluxgen
1 files changed,
27 insertions(+),
1 deletions(-)
jump to
M
src/Shape.cc
→
src/Shape.cc
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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); +}