summaryrefslogtreecommitdiffstats
path: root/kdm/kfrontend/kgapp.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-10-29 20:12:44 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-10-29 20:12:44 +0000
commita5baef50dc920632f9400f74f763b1671c36d63e (patch)
treea1e98ac7be77fdda6d3783615f7b628ff4c632a2 /kdm/kfrontend/kgapp.cpp
parentc95d8deaf121c1971dd7dc0a7c0c5459b308d9d7 (diff)
downloadtdebase-a5baef50dc920632f9400f74f763b1671c36d63e.tar.gz
tdebase-a5baef50dc920632f9400f74f763b1671c36d63e.zip
Allow kdebase compilation with optional xrandr support disabledv3.5.13
Thanks to Francois Andriot for the patch! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1261450 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdm/kfrontend/kgapp.cpp')
-rw-r--r--kdm/kfrontend/kgapp.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp
index f0a4e3e6a..b9038f698 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;