summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-29 03:39:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-29 03:39:29 +0000
commit71519fb37e5d0794a36e28d0c6efe1d197639ccb (patch)
tree40ad972526bf79141ec23f21e6481975d67ea6b4 /kdesktop
parent5669b778e5426a75b50fcd63deaba022c25ab5bc (diff)
downloadtdebase-71519fb37e5d0794a36e28d0c6efe1d197639ccb.tar.gz
tdebase-71519fb37e5d0794a36e28d0c6efe1d197639ccb.zip
More display switching repairs
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1120414 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/krootwm.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/kdesktop/krootwm.cc b/kdesktop/krootwm.cc
index fa22ab146..145360b65 100644
--- a/kdesktop/krootwm.cc
+++ b/kdesktop/krootwm.cc
@@ -600,7 +600,11 @@ void KRootWm::slotWindowList() {
// kdDebug() << "KRootWm::slotWindowList" << endl;
// Popup at the center of the screen, this is from keyboard shortcut.
QDesktopWidget* desktop = KApplication::desktop();
- QRect r = desktop->screenGeometry( desktop->screenNumber(QCursor::pos()));
+ QRect r;
+ if (desktop->numScreens() < 2)
+ r = desktop->geometry();
+ else
+ r = desktop->screenGeometry( desktop->screenNumber(QCursor::pos()));
windowListMenu->init();
disconnect( windowListMenu, SIGNAL( aboutToShow() ),
this, SLOT( slotWindowListAboutToShow() ) ); // avoid calling init() twice
@@ -616,7 +620,11 @@ void KRootWm::slotSwitchUser() {
if (!sessionsMenu)
return;
QDesktopWidget* desktop = KApplication::desktop();
- QRect r = desktop->screenGeometry( desktop->screenNumber(QCursor::pos()));
+ QRect r;
+ if (desktop->numScreens() < 2)
+ r = desktop->geometry();
+ else
+ r = desktop->screenGeometry( desktop->screenNumber(QCursor::pos()));
slotPopulateSessions();
disconnect( sessionsMenu, SIGNAL( aboutToShow() ),
this, SLOT( slotPopulateSessions() ) ); // avoid calling init() twice