From 4ed967f2cb719aabd74f80be4ccb60a6594b089a Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 31 Mar 2019 23:49:47 +0900 Subject: Fixed use of SAK in lock process when autologin is used in TDM. This resolves bug 2945. Manually cherry-picked from commit 7aa9258f. Signed-off-by: Michele Calgaro --- kcontrol/screensaver/scrnsave.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'kcontrol') diff --git a/kcontrol/screensaver/scrnsave.cpp b/kcontrol/screensaver/scrnsave.cpp index a0b26ae46..b66f7bbd6 100644 --- a/kcontrol/screensaver/scrnsave.cpp +++ b/kcontrol/screensaver/scrnsave.cpp @@ -46,20 +46,9 @@ #include #include - #include "scrnsave.h" - #include -#define OPEN_TDMCONFIG_AND_SET_GROUP \ -if( stat( KDE_CONFDIR "/tdm/tdmdistrc" , &st ) == 0) { \ - mTDMConfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmdistrc" )); \ -} \ -else { \ - mTDMConfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmrc" )); \ -} \ -mTDMConfig->setGroup("X-:*-Greeter"); - template class TQPtrList; const uint widgetEventMask = // X event mask @@ -94,7 +83,13 @@ KScreenSaver::KScreenSaver(TQWidget *parent, const char *name, const TQStringLis mTesting = false; struct stat st; - OPEN_TDMCONFIG_AND_SET_GROUP + if( stat( KDE_CONFDIR "/tdm/tdmdistrc" , &st ) == 0) { + mTDMConfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmdistrc" )); + } + else { + mTDMConfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmrc" )); + } + mTDMConfig->setGroup("X-:*-Greeter"); // Add non-TDE path TDEGlobal::dirs()->addResourceType("scrsav", -- cgit v1.2.1