Take decorationUseAlpha decoration flag when setting the PAINT_WINDOW_TRANSLUCENT bit mask.
BUG: 235821 svn path=/trunk/KDE/kdebase/workspace/; revision=1121187
This commit is contained in:
parent
c05888a59b
commit
9f8bbd1d6c
2 changed files with 12 additions and 2 deletions
12
scene.cpp
12
scene.cpp
|
@ -186,7 +186,7 @@ void Scene::paintGenericScreen( int orig_mask, ScreenPaintData )
|
||||||
foreach( Window* w, stacking_order ) // bottom to top
|
foreach( Window* w, stacking_order ) // bottom to top
|
||||||
{
|
{
|
||||||
WindowPrePaintData data;
|
WindowPrePaintData data;
|
||||||
data.mask = orig_mask | ( w->isOpaque() ? PAINT_WINDOW_OPAQUE : PAINT_WINDOW_TRANSLUCENT );
|
data.mask = orig_mask | ( (w->isOpaque() && !w->toplevelDecorationHasAlpha())? PAINT_WINDOW_OPAQUE : PAINT_WINDOW_TRANSLUCENT );
|
||||||
w->resetPaintingEnabled();
|
w->resetPaintingEnabled();
|
||||||
data.paint = infiniteRegion(); // no clipping, so doesn't really matter
|
data.paint = infiniteRegion(); // no clipping, so doesn't really matter
|
||||||
data.clip = QRegion();
|
data.clip = QRegion();
|
||||||
|
@ -229,7 +229,7 @@ void Scene::paintSimpleScreen( int orig_mask, QRegion region )
|
||||||
{
|
{
|
||||||
Window* w = stacking_order[ i ];
|
Window* w = stacking_order[ i ];
|
||||||
WindowPrePaintData data;
|
WindowPrePaintData data;
|
||||||
data.mask = orig_mask | ( w->isOpaque() ? PAINT_WINDOW_OPAQUE : PAINT_WINDOW_TRANSLUCENT );
|
data.mask = orig_mask | ( (w->isOpaque() && !w->toplevelDecorationHasAlpha()) ? PAINT_WINDOW_OPAQUE : PAINT_WINDOW_TRANSLUCENT );
|
||||||
w->resetPaintingEnabled();
|
w->resetPaintingEnabled();
|
||||||
data.paint = region;
|
data.paint = region;
|
||||||
// Clip out the decoration for opaque windows; the decoration is drawn in the second pass
|
// Clip out the decoration for opaque windows; the decoration is drawn in the second pass
|
||||||
|
@ -440,6 +440,14 @@ bool Scene::Window::isOpaque() const
|
||||||
return toplevel->opacity() == 1.0 && !toplevel->hasAlpha();
|
return toplevel->opacity() == 1.0 && !toplevel->hasAlpha();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Scene::Window::toplevelDecorationHasAlpha( void ) const
|
||||||
|
{
|
||||||
|
if( toplevel->clientPos() == QPoint( 0, 0 ) && toplevel->clientSize() == toplevel->visibleRect().size())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return Workspace::self()->decorationHasAlpha();
|
||||||
|
}
|
||||||
|
|
||||||
bool Scene::Window::isPaintingEnabled() const
|
bool Scene::Window::isPaintingEnabled() const
|
||||||
{
|
{
|
||||||
return !disable_painting;
|
return !disable_painting;
|
||||||
|
|
2
scene.h
2
scene.h
|
@ -186,6 +186,8 @@ class Scene::Window
|
||||||
bool isVisible() const;
|
bool isVisible() const;
|
||||||
// is the window fully opaque
|
// is the window fully opaque
|
||||||
bool isOpaque() const;
|
bool isOpaque() const;
|
||||||
|
// does the decoration has alpha channel
|
||||||
|
bool toplevelDecorationHasAlpha( void ) const;
|
||||||
// shape of the window
|
// shape of the window
|
||||||
QRegion shape() const;
|
QRegion shape() const;
|
||||||
QRegion clientShape() const;
|
QRegion clientShape() const;
|
||||||
|
|
Loading…
Reference in a new issue