summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-08-27 03:59:51 +0000
committerDana Jansens <danakj@orodu.net>2002-08-27 03:59:51 +0000
commit9667f3a0e9d9c70e313db9930f00743992613033 (patch)
tree317de5ae86f9de58509cf8b7edcd9732a9403546 /src
parent53b6f16b4601a3cdf2adca41fbae9c76a3b3c1f1 (diff)
fix shape.
a) it didnt work when it added shape after mapping b) removing shape wouldnt have worked right either
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/Window.cc b/src/Window.cc
index a1567156..32fe86c7 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1631,6 +1631,14 @@ void BlackboxWindow::configureShape(void) {
ShapeBounding, 0, 0, xrect, num,
ShapeUnion, Unsorted);
}
+
+
+void BlackboxWindow::clearShape(void) {
+ XShapeCombineMask(blackbox->getXDisplay(), frame.window, ShapeBounding,
+ frame.margin.left - frame.border_w,
+ frame.margin.top - frame.border_w,
+ None, ShapeSet);
+}
#endif // SHAPE
@@ -3785,9 +3793,15 @@ void BlackboxWindow::leaveNotifyEvent(const XCrossingEvent*) {
#ifdef SHAPE
-void BlackboxWindow::shapeEvent(XShapeEvent *) {
- if (blackbox->hasShapeExtensions() && flags.shaped) {
- configureShape();
+void BlackboxWindow::shapeEvent(XShapeEvent *e) {
+ if (blackbox->hasShapeExtensions()) {
+ if (! e->shaped && flags.shaped) {
+ clearShape();
+ flags.shaped = False;
+ } else if (e->shaped) {
+ configureShape();
+ flags.shaped = True;
+ }
}
}
#endif // SHAPE