diff options
Diffstat (limited to 'kdesktop')
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 17 | ||||
-rw-r--r-- | kdesktop/lock/main.cc | 16 |
2 files changed, 19 insertions, 14 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index c6935c9b5..28a46b47b 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -157,7 +157,7 @@ trinity_desktop_lock_autohide_lockdlg = TRUE; // starting screensaver hacks, and password entry. // LockProcess::LockProcess() - : TQWidget(0L, "saver window", (trinity_desktop_lock_use_system_modal_dialogs?((WFlags)(WStyle_StaysOnTop|WStyle_Customize|WStyle_NoBorder)):((WFlags)WX11BypassWM))), + : TQWidget(0L, "saver window", ((WFlags)(WStyle_StaysOnTop|WStyle_Customize|WStyle_NoBorder))), mOpenGLVisual(0), mParent(0), mShowLockDateTime(false), @@ -344,6 +344,10 @@ LockProcess::~LockProcess() // void LockProcess::init(bool child, bool useBlankOnly) { + if (!trinity_desktop_lock_use_system_modal_dialogs) { + setWFlags((WFlags)WX11BypassWM); + } + child_saver = child; mUseBlankOnly = useBlankOnly; @@ -1260,12 +1264,13 @@ bool LockProcess::startSaver() // Try to get the root pixmap if (!m_rootPixmap) m_rootPixmap = new KRootPixmap(this); m_rootPixmap->setCustomPainting(true); + m_rootPixmap->start(); // Sometimes KRootPixmap fails...make sure the desktop is hidden regardless if (!mEnsureScreenHiddenTimer) { mEnsureScreenHiddenTimer = new TQTimer( this ); connect( mEnsureScreenHiddenTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotForcePaintBackground()) ); + mEnsureScreenHiddenTimer->start(2000, true); } - mEnsureScreenHiddenTimer->start(2000, true); } if (trinity_desktop_lock_in_sec_dlg == FALSE) { @@ -1818,7 +1823,13 @@ void LockProcess::slotForcePaintBackground() void LockProcess::slotPaintBackground(const TQPixmap &rpm) { - mEnsureScreenHiddenTimer->stop(); + if (mEnsureScreenHiddenTimer) { + mEnsureScreenHiddenTimer->stop(); + } + else { + mEnsureScreenHiddenTimer = new TQTimer( this ); + connect( mEnsureScreenHiddenTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotForcePaintBackground()) ); + } TQPixmap pm = rpm; diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc index 8bc7808ea..8f6f76b28 100644 --- a/kdesktop/lock/main.cc +++ b/kdesktop/lock/main.cc @@ -204,15 +204,9 @@ int main( int argc, char **argv ) app.disableSessionManagement(); KGlobal::locale()->insertCatalogue("libdmctl"); - // we need to read from the right rc file - possibly taking screen number in account - KDesktopSettings::instance("kdesktoprc"); - - trinity_desktop_lock_use_system_modal_dialogs = !KDesktopSettings::useUnmanagedLockWindows(); - trinity_desktop_lock_delay_screensaver_start = KDesktopSettings::delaySaverStart(); - struct stat st; KSimpleConfig* tdmconfig; - OPEN_TDMCONFIG_AND_SET_GROUP + OPEN_TDMCONFIG_AND_SET_GROUP trinity_desktop_lock_use_sak = tdmconfig->readBoolEntry("UseSAK", true); LockProcess process; @@ -271,10 +265,10 @@ int main( int argc, char **argv ) } } - // Reload settings to make sure they reflect reality - KDesktopSettings::self()->config()->reparseConfiguration(); - delete tdmconfig; - OPEN_TDMCONFIG_AND_SET_GROUP + // load settings here so that they actually reflect reality + // there is no way to force a reload once KDesktopSettings::instance has been called! + // we need to read from the right rc file - possibly taking screen number in account + KDesktopSettings::instance("kdesktoprc"); trinity_desktop_lock_use_system_modal_dialogs = !KDesktopSettings::useUnmanagedLockWindows(); trinity_desktop_lock_delay_screensaver_start = KDesktopSettings::delaySaverStart(); if (trinity_desktop_lock_use_system_modal_dialogs) { |