summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-24 19:21:48 -0500
committerSlávek Banko <slavek.banko@axis.cz>2012-06-03 03:27:11 +0200
commiteaf5fadba819d19042e8ba6aee637a54b29cc8aa (patch)
treec9af17178b98847227fd2906258e32cab3765ef3
parent33d5f26e9ee2830794bdce99522fe324001d42a7 (diff)
downloadtdebase-eaf5fadba819d19042e8ba6aee637a54b29cc8aa.tar.gz
tdebase-eaf5fadba819d19042e8ba6aee637a54b29cc8aa.zip
Fix SAK dialog momentary display when SAK disabled
Clean up build warnings in kdesktop (cherry picked from commit 30617b6fb78c56e76aedd1480429dd4e68da201a)
-rw-r--r--kdesktop/bgmanager.cc10
-rw-r--r--kdesktop/desktop.cc2
-rw-r--r--kdesktop/kdesktop.kcfg7
-rw-r--r--kdesktop/lock/main.cc15
-rw-r--r--kdm/kfrontend/kgapp.cpp8
5 files changed, 26 insertions, 16 deletions
diff --git a/kdesktop/bgmanager.cc b/kdesktop/bgmanager.cc
index c3979aacb..6a2b0f198 100644
--- a/kdesktop/bgmanager.cc
+++ b/kdesktop/bgmanager.cc
@@ -125,7 +125,7 @@ KBackgroundManager::KBackgroundManager(TQWidget *desktop, KWinModule* kwinModule
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
}
- for (unsigned j=0;j<(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);j++) {
+ for (signed j=0;j<(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);j++) {
renderBackground(j);
}
}
@@ -250,7 +250,7 @@ void KBackgroundManager::configure()
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
}
- for (unsigned j=0;j<(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);j++) {
+ for (signed j=0;j<(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);j++) {
renderBackground(j);
}
}
@@ -350,7 +350,7 @@ void KBackgroundManager::slotChangeDesktop(int desk)
desk--;
// Lazy initialisation of # of desktops
- if ((m_pKwinmodule->numberOfDesktops() * m_numberOfViewports) >= m_Renderer.size())
+ if ((unsigned)(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports) >= m_Renderer.size())
slotChangeNumberOfDesktops( m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);
int edesk = effectiveDesktop();
@@ -410,7 +410,7 @@ void KBackgroundManager::slotChangeViewport(int desk, const TQPoint& viewport)
desk--;
// Lazy initialisation of # of desktops
- if ((m_pKwinmodule->numberOfDesktops() * m_numberOfViewports) >= m_Renderer.size())
+ if ((unsigned)(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports) >= m_Renderer.size())
slotChangeNumberOfDesktops( m_pKwinmodule->numberOfDesktops() * m_numberOfViewports );
int edesk = effectiveDesktop();
@@ -963,7 +963,7 @@ void KBackgroundManager::desktopResized()
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
}
- for (unsigned j=0;j<(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);j++) {
+ for (signed j=0;j<(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);j++) {
renderBackground(j);
}
}
diff --git a/kdesktop/desktop.cc b/kdesktop/desktop.cc
index 842b543ab..a31b0f95d 100644
--- a/kdesktop/desktop.cc
+++ b/kdesktop/desktop.cc
@@ -135,8 +135,8 @@ KDesktop::WheelDirection KDesktop::m_eWheelDirection = KDesktop::m_eDefaultWheel
const char* KDesktop::m_wheelDirectionStrings[2] = { "Forward", "Reverse" };
KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) :
- KDesktopIface(),
TQWidget( 0L, "desktop", (WFlags)(WResizeNoErase | ( x_root_hack ? (WStyle_Customize | WStyle_NoBorder) : 0)) ),
+ KDesktopIface(),
// those two WStyle_ break kdesktop when the root-hack isn't used (no Dnd)
startup_id( NULL ), m_waitForKicker(0)
{
diff --git a/kdesktop/kdesktop.kcfg b/kdesktop/kdesktop.kcfg
index 669c87aff..009d5ed6e 100644
--- a/kdesktop/kdesktop.kcfg
+++ b/kdesktop/kdesktop.kcfg
@@ -311,13 +311,6 @@
<!-- /home/paco/cvsroot/kdebase/kdesktop/lock/lockprocess.cc:336 -->
<!-- mSaver = config.readEntry("UseUnmanagedLockWindows"); -->
</entry>
- <entry key="UseTDESAK" type="Bool">
- <default>true</default>
- <label></label>
- <whatsthis>Set to true to enable usage of the Trinity SAK anti-spoofing system</whatsthis>
- <!-- /home/paco/cvsroot/kdebase/kdesktop/lock/lockprocess.cc:336 -->
- <!-- mSaver = config.readEntry("UseTDESAK"); -->
- </entry>
<entry key="ShowLockDateTime" type="Bool">
<default>true</default>
<label></label>
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index 89dc1917c..66aa62243 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -29,6 +29,7 @@
#include <kdebug.h>
#include <kglobalsettings.h>
#include <dcopref.h>
+#include <ksimpleconfig.h>
#include <kdmtsak.h>
@@ -199,7 +200,19 @@ int main( int argc, char **argv )
trinity_desktop_lock_use_system_modal_dialogs = !KDesktopSettings::useUnmanagedLockWindows();
trinity_desktop_lock_delay_screensaver_start = KDesktopSettings::delaySaverStart();
- trinity_desktop_lock_use_sak = KDesktopSettings::useTDESAK();
+
+ // RAJA
+ struct stat st;
+ KSimpleConfig* tdmconfig;
+ if( stat( KDE_CONFDIR "/kdm/kdmdistrc" , &st ) == 0) {
+ tdmconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/kdm/kdmdistrc" ));
+ }
+ else {
+ tdmconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/kdm/kdmrc" ));
+ }
+ tdmconfig->setGroup("X-*-Greeter");
+ trinity_desktop_lock_use_sak = tdmconfig->readBoolEntry("UseSAK", true);
+ delete tdmconfig;
if (args->isSet( "internal" )) {
while (signalled_run == FALSE) {
diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp
index 34c6c3f15..1999856de 100644
--- a/kdm/kfrontend/kgapp.cpp
+++ b/kdm/kfrontend/kgapp.cpp
@@ -385,7 +385,9 @@ kg_main( const char *argv0 )
is_themed = false;
has_kwin = has_kwin_bkp;
delete tgrt;
- checkSAK(app);
+ if (trinity_desktop_lock_use_sak) {
+ checkSAK(app);
+ }
dialog = new KStdGreeter;
#ifdef WITH_XRANDR
dialog->move(dialog->x() + primaryScreenPosition.x(), dialog->y() + primaryScreenPosition.y());
@@ -398,7 +400,9 @@ kg_main( const char *argv0 )
}
XSetErrorHandler( (XErrorHandler)0 );
} else {
- checkSAK(app);
+ if (trinity_desktop_lock_use_sak) {
+ checkSAK(app);
+ }
dialog = new KStdGreeter;
#ifdef WITH_XRANDR
dialog->move(dialog->x() + primaryScreenPosition.x(), dialog->y() + primaryScreenPosition.y());