Do not calculate window mask from svg when compositing is active as it's not needed and speeds up resizing.
And correctly paint themes not providing an opaque element (which they should provide for the window mask) when compositing is not active. svn path=/trunk/KDE/kdebase/workspace/; revision=994961
This commit is contained in:
parent
9f43aaa1e1
commit
70a4878fbb
1 changed files with 14 additions and 6 deletions
|
@ -661,11 +661,17 @@ void AuroraeClient::paintEvent(QPaintEvent *event)
|
|||
}
|
||||
QRectF sourceRect = rect;
|
||||
if (!compositingActive()) {
|
||||
if (frame->hasElementPrefix("decoration-opaque")) {
|
||||
rect = QRectF(conf.paddingLeft(), conf.paddingTop(),
|
||||
widget()->width()-conf.paddingRight()-conf.paddingLeft(),
|
||||
widget()->height()-conf.paddingBottom()-conf.paddingTop());
|
||||
sourceRect = QRectF(0.0, 0.0, rect.width(), rect.height());
|
||||
}
|
||||
else {
|
||||
rect = QRectF(conf.paddingLeft(), conf.paddingTop(), widget()->width(), widget()->height());
|
||||
sourceRect = rect;
|
||||
}
|
||||
}
|
||||
frame->resizeFrame(rect.size());
|
||||
frame->paintFrame(&painter, rect, sourceRect);
|
||||
|
||||
|
@ -685,7 +691,7 @@ void AuroraeClient::updateWindowShape()
|
|||
int w=widget()->width();
|
||||
int h=widget()->height();
|
||||
|
||||
if (maximized) {
|
||||
if (maximized || compositingActive()) {
|
||||
QRegion mask(0,0,w,h);
|
||||
setMask(mask);
|
||||
return;
|
||||
|
@ -695,7 +701,9 @@ void AuroraeClient::updateWindowShape()
|
|||
Plasma::FrameSvg *deco = AuroraeFactory::instance()->frame();
|
||||
if (!deco->hasElementPrefix("decoration-opaque")) {
|
||||
// opaque element is missing: set generic mask
|
||||
QRegion mask(0,0,w,h);
|
||||
w = w - conf.paddingLeft() - conf.paddingRight();
|
||||
h = h - conf.paddingTop() - conf.paddingBottom();
|
||||
QRegion mask(conf.paddingLeft(),conf.paddingTop(),w,h);
|
||||
setMask(mask);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue