summaryrefslogtreecommitdiffstats
path: root/kdm
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-24 03:21:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-24 03:21:22 +0000
commit9cff39bc34d1f0579b2f9841f55c6cebc87fed57 (patch)
tree3d809111cc494a4e2267a55bb6fd327fd0194830 /kdm
parent422e6d3a19cb512c83ae4145bb4ffb8cc491f454 (diff)
downloadtdebase-9cff39bc34d1f0579b2f9841f55c6cebc87fed57.tar.gz
tdebase-9cff39bc34d1f0579b2f9841f55c6cebc87fed57.zip
Enable the new display configuration module
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1249201 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdm')
-rw-r--r--kdm/kfrontend/CMakeLists.txt2
-rw-r--r--kdm/kfrontend/kgapp.cpp14
2 files changed, 13 insertions, 3 deletions
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 <ksimpleconfig.h>
#include <klocale.h>
#include <kdebug.h>
+#include <libkrandr/libkrandr.h>
#include <tqtimer.h>
#include <tqstring.h>
@@ -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;