From 8f514540fcb06ca42c2829313b4058e45dda3a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 22 Aug 2012 22:03:43 +0200 Subject: Disable use of SAK if TSAK is not built Thanks to Francois Andriot for the patch This resolves Bug 1180 --- config.h.cmake | 3 +++ kdesktop/lock/main.cc | 9 ++++++++- tdm/kfrontend/kgapp.cpp | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config.h.cmake b/config.h.cmake index 772ca8840..b5433283c 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -185,3 +185,6 @@ // tdm, kcontrol #cmakedefine WITH_XRANDR "@WITH_XRANDR@" + +// tsak +#cmakedefine BUILD_TSAK "@BUILD_TSAK@" diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc index 8f6f76b28..56b4b5fed 100644 --- a/kdesktop/lock/main.cc +++ b/kdesktop/lock/main.cc @@ -207,8 +207,11 @@ int main( int argc, char **argv ) struct stat st; KSimpleConfig* tdmconfig; OPEN_TDMCONFIG_AND_SET_GROUP +#ifdef BUILD_TSAK trinity_desktop_lock_use_sak = tdmconfig->readBoolEntry("UseSAK", true); - +#else + trinity_desktop_lock_use_sak = false; +#endif LockProcess process; // Start loading core functions, such as the desktop wallpaper interface @@ -272,7 +275,11 @@ int main( int argc, char **argv ) 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) { +#ifdef BUILD_TSAK trinity_desktop_lock_use_sak = tdmconfig->readBoolEntry("UseSAK", true); +#else + trinity_desktop_lock_use_sak = false; +#endif } 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 diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 41d781d3c..43fbe9ec2 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -195,7 +195,11 @@ kg_main( const char *argv0 ) KProcess *dcop = 0; KProcess *twin = 0; +#ifdef BUILD_TSAK trinity_desktop_lock_use_sak = _useSAK; +#else + trinity_desktop_lock_use_sak = false; +#endif if (trinity_desktop_lock_use_sak) { tsak = new KProcess; *tsak << TQCString( argv0, strrchr( argv0, '/' ) - argv0 + 2 ) + "tsak"; -- cgit v1.2.1