summaryrefslogtreecommitdiffstats
path: root/ksmserver/shutdowndlg.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-18 10:22:48 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-18 10:22:48 -0500
commit1eb5bc816598318458e3a6459663af103a46094b (patch)
tree145e8ec65da86972a2fcf2f25ff898f1f29009a0 /ksmserver/shutdowndlg.cpp
parentd41051b3a2e2440f8648a8b30bc0e4b3524d3f13 (diff)
downloadtdebase-1eb5bc816598318458e3a6459663af103a46094b.tar.gz
tdebase-1eb5bc816598318458e3a6459663af103a46094b.zip
Beautify logout process
Diffstat (limited to 'ksmserver/shutdowndlg.cpp')
-rw-r--r--ksmserver/shutdowndlg.cpp36
1 files changed, 29 insertions, 7 deletions
diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp
index ad2d9113f..b30e6ec2e 100644
--- a/ksmserver/shutdowndlg.cpp
+++ b/ksmserver/shutdowndlg.cpp
@@ -519,7 +519,7 @@ void KSMShutdownFeedback::slotPaintEffect()
KSMShutdownIPFeedback * KSMShutdownIPFeedback::s_pSelf = 0L;
KSMShutdownIPFeedback::KSMShutdownIPFeedback()
-: TQWidget( 0L, "systemmodaldialogclass", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop ), m_timeout(0), m_isPainted(false), m_sharedRootPixmap(NULL), mPixmapTimeout(0)
+: TQWidget( 0L, "systemmodaldialogclass", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop ), m_timeout(0), m_isPainted(false), m_paintedFromSharedRootPixmap(false), m_sharedRootPixmap(NULL), mPixmapTimeout(0)
{
setShown(false);
@@ -559,7 +559,10 @@ void KSMShutdownIPFeedback::showNow()
{
setShown(true);
- TQTimer::singleShot( 0, this, SLOT(slotPaintEffect()) );
+ if (!m_isPainted) {
+ setGeometry( TQApplication::desktop()->geometry() );
+ TQTimer::singleShot( 0, this, SLOT(slotPaintEffect()) );
+ }
}
void KSMShutdownIPFeedback::enableExports()
@@ -588,12 +591,19 @@ KSMShutdownIPFeedback::~KSMShutdownIPFeedback()
if (m_sharedRootPixmap) {
m_sharedRootPixmap->stop();
delete m_sharedRootPixmap;
+ m_sharedRootPixmap = NULL;
}
}
-void KSMShutdownIPFeedback::fadeBack( void )
-{
+void KSMShutdownIPFeedback::fadeBack( void ) {
+ //
+}
+void KSMShutdownIPFeedback::resizeEvent(TQResizeEvent* re) {
+ if (m_isPainted) {
+ // Resist all attempts to change size
+ setGeometry( m_screenGeometry );
+ }
}
void KSMShutdownIPFeedback::slotSetBackgroundPixmap(const TQPixmap &rpm) {
@@ -602,6 +612,10 @@ void KSMShutdownIPFeedback::slotSetBackgroundPixmap(const TQPixmap &rpm) {
void KSMShutdownIPFeedback::slotPaintEffect()
{
+ if (m_isPainted && m_paintedFromSharedRootPixmap) {
+ return;
+ }
+
TQPixmap pm = m_rootPixmap;
if (mPixmapTimeout == 0) {
if (TQPaintDevice::x11AppDepth() != 32) {
@@ -630,6 +644,15 @@ void KSMShutdownIPFeedback::slotPaintEffect()
else {
pm = TQPixmap(kapp->desktop()->width(), kapp->desktop()->height());
pm.fill(Qt::black);
+ m_paintedFromSharedRootPixmap = false;
+ }
+ }
+ else {
+ m_paintedFromSharedRootPixmap = true;
+ if (m_sharedRootPixmap) {
+ m_sharedRootPixmap->stop();
+ delete m_sharedRootPixmap;
+ m_sharedRootPixmap = NULL;
}
}
@@ -657,7 +680,8 @@ void KSMShutdownIPFeedback::slotPaintEffect()
setBackgroundPixmap( pm );
move(0,0);
setWindowState(WindowFullScreen);
- setGeometry( TQApplication::desktop()->geometry() );
+ m_screenGeometry = TQApplication::desktop()->geometry();
+ setGeometry( m_screenGeometry );
repaint(true);
tqApp->flushX();
@@ -1222,8 +1246,6 @@ void KSMDelayedPushButton::slotReleased()
void KSMDelayedPushButton::slotTimeout()
{
TQPoint bl = mapToGlobal(rect().bottomLeft());
- TQWidget *par = (TQWidget*)parent();
- TQPoint br = par->mapToGlobal(par->rect().bottomRight());
pop->popup( bl );
popt->stop();
setDown(false);