summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--kdesktop/lock/lockprocess.cc10
-rw-r--r--ksmserver/shutdowndlg.cpp30
2 files changed, 33 insertions, 7 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index c8681c6df..93fe4d9ae 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -316,9 +316,11 @@ static int signal_pipe[2];
static void sigterm_handler(int)
{
- char tmp = 'T';
- if (::write( signal_pipe[1], &tmp, 1) == -1) {
- // Error handler to shut up gcc warnings
+ if (!trinity_desktop_lock_in_sec_dlg) {
+ char tmp = 'T';
+ if (::write( signal_pipe[1], &tmp, 1) == -1) {
+ // Error handler to shut up gcc warnings
+ }
}
}
@@ -657,7 +659,7 @@ void LockProcess::startSecureDialog()
kapp->quit();
}
// FIXME
- // Handle remaining two cases (task manager and logoff menu)
+ // Handle remaining two cases (logoff menu and switch user)
stopSaver();
}
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);
}