Implement fake brightness by overlaying black over the window.
Makes Logout or DimInactive effects work in XRender mode too. svn path=/trunk/KDE/kdebase/workspace/; revision=805577
This commit is contained in:
parent
62d2631422
commit
022d2066c6
2 changed files with 6 additions and 2 deletions
|
@ -150,8 +150,6 @@ OpenGL TODO
|
|||
XRender TODO
|
||||
==============================
|
||||
|
||||
+ SceneXrender::Window::performPaint() doesn't use brightness
|
||||
|
||||
+ SceneXrender::paintTransformedScreen() doesn't handle properly extending of painted area
|
||||
in window's pre-paint - see the transformedShape() comment
|
||||
- and currently seems to be generally broken
|
||||
|
|
|
@ -516,12 +516,18 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa
|
|||
{
|
||||
XRenderComposite( display(), PictOpSrc, pic, None, buffer, 0, 0, 0, 0,
|
||||
x, y, width, height);
|
||||
// fake brightness change by overlaying black
|
||||
XRenderColor col = { 0, 0, 0, 0xffff * ( 1 - data.brightness ) };
|
||||
XRenderFillRectangle( display(), PictOpOver, buffer, &col, x, y, width, height );
|
||||
}
|
||||
else
|
||||
{
|
||||
Picture alpha = alphaMask( data.opacity );
|
||||
XRenderComposite( display(), PictOpOver, pic, alpha, buffer, 0, 0, 0, 0,
|
||||
x, y, width, height);
|
||||
// fake brightness change by overlaying black
|
||||
XRenderColor col = { 0, 0, 0, 0xffff * ( 1 - data.brightness ) * data.opacity };
|
||||
XRenderFillRectangle( display(), PictOpOver, buffer, &col, x, y, width, height );
|
||||
transformed_shape = QRegion();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue