summaryrefslogtreecommitdiffstats
path: root/kicker
diff options
context:
space:
mode:
Diffstat (limited to 'kicker')
-rw-r--r--kicker/kicker/core/menumanager.cpp6
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);