X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2FWindow.cc;h=32fe86c75c373205b0ea01d379cf1bc96749deb1;hb=07e619ebbb7c43b22f3bcb5672413d343cf66d24;hp=c260818c68ba271e97dce45fe7c89ffca0bede36;hpb=f763814b338f9418e705309ddc87f68140d7888a;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index c260818c..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 @@ -2635,7 +2643,7 @@ void BlackboxWindow::redrawCloseButton(bool pressed) const { XClearWindow(blackbox->getXDisplay(), frame.close_button); BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus : - screen->getWindowStyle()->b_pic_unfocus); + screen->getWindowStyle()->b_pic_unfocus, 0, 2); XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(), 2, 2, (frame.button_w - 3), (frame.button_w - 3)); XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(), @@ -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