Fix kdm startup when compositor is not enabled

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246838 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent fd8aae5abc
commit 3156b910d9

@ -1990,7 +1990,7 @@ Key: Compositor
Type: string
Default: ""
User: greeter
Instance: #*/""
Instance: */"kompmgr"
Comment:
Compositor binary name, if compositing is desired. "" means no compositing support.
Description:

@ -211,7 +211,7 @@ kg_main( const char *argv0 )
XSetErrorHandler( (XErrorHandler)0 );
GreeterApp *app;
if( argb_visual_available ) {
if ( (argb_visual_available == true) && (!_compositor.isEmpty()) ) {
app = new GreeterApp(dpyi);
}
else {

@ -246,9 +246,14 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r )
scaledImage = pClass->pixmap.convertToImage();
} else {
kdDebug() << timestamp() << " convertFromImage smoothscale\n";
if (pClass->pixmap.isNull()) {
scaledImage = TQImage();
}
else {
TQImage tempImage = pClass->pixmap.convertToImage();
kdDebug() << timestamp() << " convertToImage done\n";
scaledImage = tempImage.smoothScale( area.width(), area.height() );
}
kdDebug() << timestamp() << " done\n";
}
} else {
@ -256,7 +261,7 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r )
{
scaledImage = pClass->pixmap.convertToImage();
// enforce rgba values for the latter
scaledImage = scaledImage.convertDepth( 32 );
if (!scaledImage.isNull()) scaledImage = scaledImage.convertDepth( 32 );
}
else
pClass->readyPixmap = pClass->pixmap;
@ -265,7 +270,7 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r )
if (haveTint || haveAlpha) {
// blend image(pix) with the given tint
scaledImage = scaledImage.convertDepth( 32 );
if (!scaledImage.isNull()) scaledImage = scaledImage.convertDepth( 32 );
int w = scaledImage.width();
int h = scaledImage.height();
float tint_red = float( pClass->tint.red() ) / 255;
@ -293,7 +298,7 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r )
// Apply the alpha in the same manner as above, exept we are now
// using the hardware blending engine for all painting
scaledImage = pClass->readyPixmap;
scaledImage = scaledImage.convertDepth( 32 );
if (!scaledImage.isNull()) scaledImage = scaledImage.convertDepth( 32 );
int w = scaledImage.width();
int h = scaledImage.height();

Loading…
Cancel
Save