summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ksmserver/shutdown.cpp6
-rw-r--r--tdm/kfrontend/themer/tdmpixmap.cpp17
2 files changed, 7 insertions, 16 deletions
diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp
index 9e8ee1d7c..01f092257 100644
--- a/ksmserver/shutdown.cpp
+++ b/ksmserver/shutdown.cpp
@@ -225,7 +225,11 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm,
TDEConfig config("power-managerrc");
bool lockOnResume = config.readBoolEntry("lockOnResume", true);
if (lockOnResume) {
- DCOPRef("kdesktop", "KScreensaverIface").send("lock");
+ TQCString replyType;
+ TQByteArray replyData;
+ // Block here until lock is complete
+ // If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages!
+ DCOPRef("kdesktop", "KScreensaverIface").call("lock()");
}
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) {
diff --git a/tdm/kfrontend/themer/tdmpixmap.cpp b/tdm/kfrontend/themer/tdmpixmap.cpp
index 2e15218fb..d9042b426 100644
--- a/tdm/kfrontend/themer/tdmpixmap.cpp
+++ b/tdm/kfrontend/themer/tdmpixmap.cpp
@@ -304,21 +304,8 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r )
// Convert pixmap from premultiplied alpha to normal alpha
{
if (scaledImage.isNull()) scaledImage = pClass->readyPixmap;
- if (!scaledImage.isNull()) scaledImage = scaledImage.convertDepth( 32 );
- int w = scaledImage.width();
- int h = scaledImage.height();
-
- for (int y = 0; y < h; ++y) {
- QRgb *ls = (QRgb *)scaledImage.scanLine( y );
- for (int x = 0; x < w; ++x) {
- QRgb l = ls[x];
- float alpha_adjust = (tqAlpha( l )/256.0);
- int r = int( tqRed( l ) * alpha_adjust );
- int g = int( tqGreen( l ) * alpha_adjust );
- int b = int( tqBlue( l ) * alpha_adjust );
- int a = int( tqAlpha( l ) * 1 );
- ls[x] = tqRgba( r, g, b, a );
- }
+ if (!scaledImage.isNull()) {
+ scaledImage = KImageEffect::convertToPremultipliedAlpha(scaledImage);
}
}