diff options
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 10 | ||||
-rw-r--r-- | ksmserver/shutdowndlg.cpp | 30 |
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); } |