Sync r982638 from Oxygen.
svn path=/trunk/KDE/kdebase/workspace/; revision=982640
This commit is contained in:
parent
8184ac42dc
commit
f024efed28
1 changed files with 12 additions and 13 deletions
|
@ -470,24 +470,23 @@ void OxygenClient::drawStripes(QPainter *p, QPalette &palette, const int start,
|
||||||
void OxygenClient::updateWindowShape()
|
void OxygenClient::updateWindowShape()
|
||||||
{
|
{
|
||||||
bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows();
|
bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows();
|
||||||
int w=widget()->width() - (int)SHADOW_WIDTH;
|
|
||||||
int h=widget()->height() - (int)SHADOW_WIDTH;
|
|
||||||
|
|
||||||
if(maximized) {
|
if(maximized || compositingActive()) {
|
||||||
QRegion mask(0,0,w,h);
|
clearMask();
|
||||||
setMask(mask);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!compositingActive()) {
|
int w=widget()->width() - (int)SHADOW_WIDTH;
|
||||||
int sw = SHADOW_WIDTH;
|
int h=widget()->height() - (int)SHADOW_WIDTH;
|
||||||
QRegion mask(sw+4, sw+0, -sw+w-8, -sw+h);
|
|
||||||
mask += QRegion(sw+0, sw+4, -sw+w, -sw+h-8);
|
|
||||||
mask += QRegion(sw+2, sw+1, -sw+w-4, -sw+h-2);
|
|
||||||
mask += QRegion(sw+1, sw+2, -sw+w-2, -sw+h-4);
|
|
||||||
|
|
||||||
setMask(mask);
|
// set a mask if compositing is not active
|
||||||
}
|
int sw = SHADOW_WIDTH;
|
||||||
|
QRegion mask(sw+4, sw+0, -sw+w-8, -sw+h);
|
||||||
|
mask += QRegion(sw+0, sw+4, -sw+w, -sw+h-8);
|
||||||
|
mask += QRegion(sw+2, sw+1, -sw+w-4, -sw+h-2);
|
||||||
|
mask += QRegion(sw+1, sw+2, -sw+w-2, -sw+h-4);
|
||||||
|
|
||||||
|
setMask(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
TileSet *OxygenClient::shadowTiles(const QColor& color, const QColor& glow, qreal size, bool active)
|
TileSet *OxygenClient::shadowTiles(const QColor& color, const QColor& glow, qreal size, bool active)
|
||||||
|
|
Loading…
Reference in a new issue