From 9cff39bc34d1f0579b2f9841f55c6cebc87fed57 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 24 Aug 2011 03:21:22 +0000 Subject: Enable the new display configuration module git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1249201 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdm/kfrontend/CMakeLists.txt | 2 +- kdm/kfrontend/kgapp.cpp | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'kdm') diff --git a/kdm/kfrontend/CMakeLists.txt b/kdm/kfrontend/CMakeLists.txt index 2c47832a8..22e017e46 100644 --- a/kdm/kfrontend/CMakeLists.txt +++ b/kdm/kfrontend/CMakeLists.txt @@ -64,7 +64,7 @@ tde_add_executable( kdm_greet AUTOMOC kfdialog.cpp kgdialog.cpp kchooser.cpp kgverify.cpp kdmshutdown.cpp kdmadmindialog.cpp kgreeter.cpp kgapp.cpp - LINK kdmthemer-static kdeui-shared Xtst + LINK kdmthemer-static kdeui-shared Xtst krandr-shared DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp index e83b61718..01d44cf63 100644 --- a/kdm/kfrontend/kgapp.cpp +++ b/kdm/kfrontend/kgapp.cpp @@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include #include #include +#include #include #include @@ -230,6 +231,11 @@ kg_main( const char *argv0 ) if (!_GUIStyle.isEmpty()) app->setStyle( _GUIStyle ); + // Load up systemwide display settings + KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI(); + TQPoint primaryScreenPosition = randrsimple->applySystemwideDisplayConfiguration("", KDE_CONFDIR); + delete randrsimple; + // Load up the systemwide ICC profile TQString iccConfigFile = TQString(KDE_CONFDIR); iccConfigFile += "/kicc/kiccconfigrc"; @@ -273,7 +279,7 @@ kg_main( const char *argv0 ) GSendInt( G_Ready ); - kdDebug() << timestamp() << " main1" << endl; + kdDebug() << timestamp() << " main1" << endl; setCursor( dpy, app->desktop()->winId(), XC_left_ptr ); for (;;) { @@ -323,8 +329,12 @@ kg_main( const char *argv0 ) dialog = new KStdGreeter; } XSetErrorHandler( (XErrorHandler)0 ); - } else + } else { dialog = new KStdGreeter; + } + dialog->move(primaryScreenPosition.x(), primaryScreenPosition.y()); + TQPoint oldCursorPos = TQCursor::pos(); + TQCursor::setPos(oldCursorPos.x() + primaryScreenPosition.x(), oldCursorPos.y() + primaryScreenPosition.y()); if (*_preloader) { proc2 = new KProcess; *proc2 << _preloader; -- cgit v1.2.3