diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-24 19:21:48 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-24 19:21:48 -0500 |
commit | 30617b6fb78c56e76aedd1480429dd4e68da201a (patch) | |
tree | 446b6177c509bd2d9414730179a66f862df9a1c3 | |
parent | 073dc86aceaa060597d7653747c3c6c14d0ed59d (diff) | |
download | tdebase-30617b6fb78c56e76aedd1480429dd4e68da201a.tar.gz tdebase-30617b6fb78c56e76aedd1480429dd4e68da201a.zip |
Fix SAK dialog momentary display when SAK disabled
Clean up build warnings in kdesktop
-rw-r--r-- | kdesktop/bgmanager.cc | 10 | ||||
-rw-r--r-- | kdesktop/desktop.cc | 2 | ||||
-rw-r--r-- | kdesktop/kdesktop.kcfg | 7 | ||||
-rw-r--r-- | kdesktop/lock/main.cc | 15 | ||||
-rw-r--r-- | tdm/kfrontend/kgapp.cpp | 8 |
5 files changed, 26 insertions, 16 deletions
diff --git a/kdesktop/bgmanager.cc b/kdesktop/bgmanager.cc index b36219692..278f267d5 100644 --- a/kdesktop/bgmanager.cc +++ b/kdesktop/bgmanager.cc @@ -125,7 +125,7 @@ KBackgroundManager::KBackgroundManager(TQWidget *desktop, KWinModule* twinModule 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 9b37e3ccc..0a105a373 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 4b5c0a2b7..8d2dc6fe5 100644 --- a/kdesktop/kdesktop.kcfg +++ b/kdesktop/kdesktop.kcfg @@ -311,13 +311,6 @@ <!-- /home/paco/cvsroot/tdebase/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/tdebase/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 225d9c5b4..896defd10 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 <tdmtsak.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 "/tdm/tdmdistrc" , &st ) == 0) { + tdmconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmdistrc" )); + } + else { + tdmconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmrc" )); + } + 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/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 8fa0c18f5..727bddf8d 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -385,7 +385,9 @@ kg_main( const char *argv0 ) is_themed = false; has_twin = has_twin_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()); |