diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-05-07 02:39:26 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-09 19:56:12 +0200 |
commit | edcb2b0e8185d4620bf07fac50d818cb3c272644 (patch) | |
tree | d627157329ae3eac3673a32b421fe234945c2ba5 | |
parent | 35fbe8f408dde2fa0efe2aba3f8ecc78565e6696 (diff) | |
download | tdebase-edcb2b0e8185d4620bf07fac50d818cb3c272644.tar.gz tdebase-edcb2b0e8185d4620bf07fac50d818cb3c272644.zip |
Fix lock screen interaction with suspend/hibernate
Use built-in premultiplied ARGB method
(cherry picked from commit 24e3f6f2fad88b7a3c28f127dff5f02cd41fed99)
-rw-r--r-- | kdm/kfrontend/themer/kdmpixmap.cpp | 17 | ||||
-rw-r--r-- | ksmserver/shutdown.cpp | 6 |
2 files changed, 7 insertions, 16 deletions
diff --git a/kdm/kfrontend/themer/kdmpixmap.cpp b/kdm/kfrontend/themer/kdmpixmap.cpp index 9bf6f86a1..3f4964144 100644 --- a/kdm/kfrontend/themer/kdmpixmap.cpp +++ b/kdm/kfrontend/themer/kdmpixmap.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); } } diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index ea0773eb6..584fa57c1 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -194,7 +194,11 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm, KConfig 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()"); } } } |