diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-26 14:44:25 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-26 14:44:25 -0500 |
commit | e92e82b761f92754db582b5e98c0b3e788eba7d9 (patch) | |
tree | 2d433106b37e7de14c90d87a84c45c9b81a9ab96 /kdesktop/lock/main.cc | |
parent | 9187194ce10d7f7297404d0108976960fe463c26 (diff) | |
download | tdebase-e92e82b761f92754db582b5e98c0b3e788eba7d9.tar.gz tdebase-e92e82b761f92754db582b5e98c0b3e788eba7d9.zip |
Fix a number of minor flaws in the lock dialog system
If SAK usage is enabled, override TDM theme
Diffstat (limited to 'kdesktop/lock/main.cc')
-rw-r--r-- | kdesktop/lock/main.cc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc index 896defd10..4dc9f1e0a 100644 --- a/kdesktop/lock/main.cc +++ b/kdesktop/lock/main.cc @@ -201,7 +201,6 @@ int main( int argc, char **argv ) trinity_desktop_lock_use_system_modal_dialogs = !KDesktopSettings::useUnmanagedLockWindows(); trinity_desktop_lock_delay_screensaver_start = KDesktopSettings::delaySaverStart(); - // RAJA struct stat st; KSimpleConfig* tdmconfig; if( stat( KDE_CONFDIR "/tdm/tdmdistrc" , &st ) == 0) { @@ -212,7 +211,11 @@ int main( int argc, char **argv ) } tdmconfig->setGroup("X-*-Greeter"); trinity_desktop_lock_use_sak = tdmconfig->readBoolEntry("UseSAK", true); - delete tdmconfig; + + LockProcess process; + + // Start loading core functions, such as the desktop wallpaper interface + app.processEvents(); if (args->isSet( "internal" )) { while (signalled_run == FALSE) { @@ -265,11 +268,25 @@ int main( int argc, char **argv ) } } + // Reload settings to make sure they reflect reality + KDesktopSettings::self()->readConfig(); + tdmconfig->reparseConfiguration(); + 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) { + trinity_desktop_lock_use_sak = tdmconfig->readBoolEntry("UseSAK", true); + } + else { + trinity_desktop_lock_use_sak = false; // If SAK is enabled with unmanaged windows, the SAK dialog will never close and will "burn in" the screen + } + + delete tdmconfig; + if (args->isSet( "forcelock" ) || (signalled_forcelock == TRUE)) { trinity_desktop_lock_forced = TRUE; } - LockProcess process(child, (args->isSet( "blank" ) || (signalled_blank == TRUE))); + process.init(child, (args->isSet( "blank" ) || (signalled_blank == TRUE))); if (!child) { process.setChildren(child_sockets); } |