summaryrefslogtreecommitdiffstats
path: root/ksmserver
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-21 23:21:48 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-21 23:21:48 +0000
commit60de68e5c083d6b504912461505de5dee1e0afb1 (patch)
tree92b78af56acdd23ab7501379b83df59d655f8d42 /ksmserver
parentcc0aef7dbfc211d32dd90d903f910f4454d86f59 (diff)
downloadtdebase-60de68e5c083d6b504912461505de5dee1e0afb1.tar.gz
tdebase-60de68e5c083d6b504912461505de5dee1e0afb1.zip
Fix ksmserver shutdown screen in ARGB mode
Do not exit the secure dialog on DCOP screensaver quit request git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1254881 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksmserver')
-rw-r--r--ksmserver/shutdowndlg.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp
index 252301275..a86887e9b 100644
--- a/ksmserver/shutdowndlg.cpp
+++ b/ksmserver/shutdowndlg.cpp
@@ -523,6 +523,16 @@ KSMShutdownIPFeedback::KSMShutdownIPFeedback()
m_sharedRootPixmap->setCustomPainting(true);
connect(m_sharedRootPixmap, TQT_SIGNAL(backgroundUpdated(const TQPixmap &)), this, TQT_SLOT(slotSetBackgroundPixmap(const TQPixmap &)));
+ if (TQPaintDevice::x11AppDepth() == 32) {
+ // The shared pixmap is 24 bits, but we are 32 bits
+ // Therefore our only option is to use a 24-bit Xorg application to dump the shared pixmap in a common (png) format for loading later
+ TQString filename = getenv("USER");
+ filename.prepend("/tmp/kde-");
+ filename.append("/krootbacking.png");
+ remove(filename.ascii());
+ system("krootbacking &");
+ }
+
resize(0, 0);
setShown(true);
}
@@ -566,16 +576,30 @@ void KSMShutdownIPFeedback::slotPaintEffect()
setGeometry( TQApplication::desktop()->geometry() );
setBackgroundMode( TQWidget::NoBackground );
- m_sharedRootPixmap->start();
+ if (TQPaintDevice::x11AppDepth() != 32) {
+ m_sharedRootPixmap->start();
+ }
+
+ TQTimer::singleShot( 100, this, SLOT(slotPaintEffect()) );
+ mPixmapTimeout++;
+ return;
+ }
+ if (TQPaintDevice::x11AppDepth() == 32) {
+ TQString filename = getenv("USER");
+ filename.prepend("/tmp/kde-");
+ filename.append("/krootbacking.png");
+ bool success = pm.load(filename, "PNG");
+ if (!success) {
+ pm = TQPixmap();
+ }
}
- if ((pm.isNull()) || (pm.width() != kapp->desktop()->width())) {
+ if ((pm.isNull()) || (pm.width() != kapp->desktop()->width()) || (pm.height() != kapp->desktop()->height())) {
if (mPixmapTimeout < 10) {
TQTimer::singleShot( 100, this, SLOT(slotPaintEffect()) );
mPixmapTimeout++;
return;
}
else {
- pm = m_rootPixmap;
pm = TQPixmap(kapp->desktop()->width(), kapp->desktop()->height());
pm.fill(Qt::black);
}