summaryrefslogtreecommitdiffstats
path: root/kdm
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-13 03:58:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-13 03:58:08 +0000
commit3156b910d9e5250170fd01c3e4234cf585c45f3f (patch)
tree458031d328db6ee1b3791fb03d0e5c3ed3a68c51 /kdm
parentfd8aae5abc3d2af171dbeba053cdb2c783123bdb (diff)
downloadtdebase-3156b910d9e5250170fd01c3e4234cf585c45f3f.tar.gz
tdebase-3156b910d9e5250170fd01c3e4234cf585c45f3f.zip
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
Diffstat (limited to 'kdm')
-rw-r--r--kdm/config.def2
-rw-r--r--kdm/kfrontend/kgapp.cpp10
-rw-r--r--kdm/kfrontend/themer/kdmpixmap.cpp17
3 files changed, 17 insertions, 12 deletions
diff --git a/kdm/config.def b/kdm/config.def
index a90d75efd..2604ff778 100644
--- a/kdm/config.def
+++ b/kdm/config.def
@@ -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:
diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp
index 7c158bc42..b57b4371d 100644
--- a/kdm/kfrontend/kgapp.cpp
+++ b/kdm/kfrontend/kgapp.cpp
@@ -176,18 +176,18 @@ kg_main( const char *argv0 )
XSetErrorHandler( ignoreXError );
argb_visual_available = false;
char *display = 0;
-
+
Display *dpyi = XOpenDisplay( display );
if ( !dpyi ) {
kdError() << "cannot connect to X server " << display << endl;
exit( 1 );
}
-
+
int screen = DefaultScreen( dpyi );
Colormap colormap = 0;
Visual *visual = 0;
int event_base, error_base;
-
+
if ( XRenderQueryExtension( dpyi, &event_base, &error_base ) ) {
int nvi;
XVisualInfo templ;
@@ -196,7 +196,7 @@ kg_main( const char *argv0 )
templ.c_class = TrueColor;
XVisualInfo *xvi = XGetVisualInfo( dpyi, VisualScreenMask | VisualDepthMask
| VisualClassMask, &templ, &nvi );
-
+
for ( int i = 0; i < nvi; i++ ) {
XRenderPictFormat *format = XRenderFindVisualFormat( dpyi, xvi[i].visual );
if ( format->type == PictTypeDirect && format->direct.alphaMask ) {
@@ -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 {
diff --git a/kdm/kfrontend/themer/kdmpixmap.cpp b/kdm/kfrontend/themer/kdmpixmap.cpp
index 436483c48..6bb1fc57d 100644
--- a/kdm/kfrontend/themer/kdmpixmap.cpp
+++ b/kdm/kfrontend/themer/kdmpixmap.cpp
@@ -246,9 +246,14 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r )
scaledImage = pClass->pixmap.convertToImage();
} else {
kdDebug() << timestamp() << " convertFromImage smoothscale\n";
- TQImage tempImage = pClass->pixmap.convertToImage();
- kdDebug() << timestamp() << " convertToImage done\n";
- scaledImage = tempImage.smoothScale( area.width(), area.height() );
+ 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();