summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.h.cmake3
-rw-r--r--kcontrol/CMakeLists.txt4
-rw-r--r--kdm/kfrontend/CMakeLists.txt5
-rw-r--r--kdm/kfrontend/kgapp.cpp12
4 files changed, 21 insertions, 3 deletions
diff --git a/config.h.cmake b/config.h.cmake
index d7017346..23527582 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -158,3 +158,6 @@
// kdm, kxkb
#cmakedefine XLIBDIR "@XLIBDIR@"
+
+// kdm, kcontrol
+#cmakedefine WITH_XRANDR "@WITH_XRANDR@"
diff --git a/kcontrol/CMakeLists.txt b/kcontrol/CMakeLists.txt
index dab1a20d..ced7671e 100644
--- a/kcontrol/CMakeLists.txt
+++ b/kcontrol/CMakeLists.txt
@@ -65,14 +65,14 @@ if( BUILD_KCONTROL )
add_subdirectory( kthememanager )
add_subdirectory( kfontinst )
add_subdirectory( access )
- add_subdirectory( displayconfig )
+ tde_conditional_add_subdirectory( WITH_XRANDR displayconfig )
tde_conditional_add_subdirectory( WITH_SAMBA samba )
tde_conditional_add_subdirectory( WITH_XRANDR randr )
tde_conditional_add_subdirectory( WITH_LIBRAW1394 view1394 )
if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
- add_subdirectory( iccconfig )
+ tde_conditional_add_subdirectory( WITH_XRANDR iccconfig )
add_subdirectory( joystick )
endif( )
diff --git a/kdm/kfrontend/CMakeLists.txt b/kdm/kfrontend/CMakeLists.txt
index aaff8085..e3093b0f 100644
--- a/kdm/kfrontend/CMakeLists.txt
+++ b/kdm/kfrontend/CMakeLists.txt
@@ -57,6 +57,9 @@ tde_add_executable( kdm_config
##### kdm_greet (executable) ####################
+if( WITH_XRANDR )
+ set( KDMGREET_OPTIONAL_LINK "krandr-shared" )
+endif ( )
tde_add_executable( kdm_greet AUTOMOC
SOURCES
@@ -64,7 +67,7 @@ tde_add_executable( kdm_greet AUTOMOC
kfdialog.cpp kgdialog.cpp kchooser.cpp kgverify.cpp
kdmshutdown.cpp kdmadmindialog.cpp kgreeter.cpp
kgapp.cpp sakdlg.cc
- LINK kdmthemer-static kdeui-shared Xtst krandr-shared
+ LINK kdmthemer-static kdeui-shared Xtst ${KDMGREET_OPTIONAL_LINK}
DESTINATION ${BIN_INSTALL_DIR}
)
diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp
index f0a4e3e6..b9038f69 100644
--- a/kdm/kfrontend/kgapp.cpp
+++ b/kdm/kfrontend/kgapp.cpp
@@ -41,7 +41,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <ksimpleconfig.h>
#include <klocale.h>
#include <kdebug.h>
+#ifdef WITH_XRANDR
#include <libkrandr/libkrandr.h>
+#endif
#include <tqtimer.h>
#include <tqstring.h>
@@ -262,9 +264,11 @@ kg_main( const char *argv0 )
app->setStyle( _GUIStyle );
// Load up systemwide display settings
+#ifdef WITH_XRANDR
KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI();
TQPoint primaryScreenPosition = randrsimple->applySystemwideDisplayConfiguration("", KDE_CONFDIR);
delete randrsimple;
+#endif
// Load up the systemwide ICC profile
TQString iccConfigFile = TQString(KDE_CONFDIR);
@@ -368,19 +372,27 @@ kg_main( const char *argv0 )
delete tgrt;
checkSAK(app);
dialog = new KStdGreeter;
+#ifdef WITH_XRANDR
dialog->move(dialog->x() + primaryScreenPosition.x(), dialog->y() + primaryScreenPosition.y());
+#endif
}
else {
+#ifdef WITH_XRANDR
dialog->move(primaryScreenPosition.x(), primaryScreenPosition.y());
+#endif
}
XSetErrorHandler( (XErrorHandler)0 );
} else {
checkSAK(app);
dialog = new KStdGreeter;
+#ifdef WITH_XRANDR
dialog->move(dialog->x() + primaryScreenPosition.x(), dialog->y() + primaryScreenPosition.y());
+#endif
}
TQPoint oldCursorPos = TQCursor::pos();
+#ifdef WITH_XRANDR
TQCursor::setPos(oldCursorPos.x() + primaryScreenPosition.x(), oldCursorPos.y() + primaryScreenPosition.y());
+#endif
if (*_preloader) {
proc2 = new KProcess;
*proc2 << _preloader;