I've done the widget with it's own impl of paintEvent and set Qt::FramelessWindowHint for it. Also I've set attribute Qt::WA_TranslucentBackground to true. At widget I draw argb pixmap.

So the problem is that KWin draws the shadow everywere under the widget, but it's needed that it wouldn't draw it at all, or only under the certain places. Is it possible?