fixed isShaped and setShapeNotify
This commit is contained in:
parent
d1b14ad084
commit
710ef5d3c9
1 changed files with 27 additions and 1 deletions
28
src/Shape.cc
28
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue