diff options
Diffstat (limited to 'kdeui')
-rw-r--r-- | kdeui/kmenubar.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kdeui/kmenubar.cpp b/kdeui/kmenubar.cpp index fcadd8648..3de441a17 100644 --- a/kdeui/kmenubar.cpp +++ b/kdeui/kmenubar.cpp @@ -328,7 +328,11 @@ void KMenuBar::selectionTimeout() KConfigGroup xineramaConfig(KGlobal::config(),"Xinerama"); int screen = xineramaConfig.readNumEntry("MenubarScreen", QApplication::desktop()->screenNumber(QPoint(0,0)) ); - QRect area = QApplication::desktop()->screenGeometry(screen); + QRect area; + if (kapp->desktop()->numScreens() < 2) + area = kapp->desktop()->geometry(); + else + area = kapp->desktop()->screenGeometry(screen); int margin = 0; move(area.left() - margin, area.top() - margin); setFixedSize(area.width() + 2* margin , heightForWidth( area.width() + 2 * margin ) ); |