diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-29 03:39:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-29 03:39:29 +0000 |
commit | 71519fb37e5d0794a36e28d0c6efe1d197639ccb (patch) | |
tree | 40ad972526bf79141ec23f21e6481975d67ea6b4 /kicker | |
parent | 5669b778e5426a75b50fcd63deaba022c25ab5bc (diff) | |
download | tdebase-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 'kicker')
-rw-r--r-- | kicker/kicker/core/menumanager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kicker/kicker/core/menumanager.cpp b/kicker/kicker/core/menumanager.cpp index ba07b39c7..9e4a91f97 100644 --- a/kicker/kicker/core/menumanager.cpp +++ b/kicker/kicker/core/menumanager.cpp @@ -150,7 +150,11 @@ void MenuManager::kmenuAccelActivated() QPoint p; // Popup the K-menu at the center of the screen. 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())); // kMenu->rect() is not valid before showing, use sizeHint() p = r.center() - QRect( QPoint( 0, 0 ), m_kmenu->sizeHint()).center(); m_kmenu->popup(p); |