summaryrefslogtreecommitdiffstats
path: root/kdeui
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-29 03:39:54 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-29 03:39:54 +0000
commit2dad7fde32e8ea6ccc660f350182587e7e6b08e1 (patch)
tree5619b541a4ffae5ba082085fb5f4f5e2c3abf9fa /kdeui
parent8949c3abab612ebf590983f9e7f439d8aafefa2a (diff)
downloadtdelibs-2dad7fde32e8ea6ccc660f350182587e7e6b08e1.tar.gz
tdelibs-2dad7fde32e8ea6ccc660f350182587e7e6b08e1.zip
More display switching repairs
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1120415 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui')
-rw-r--r--kdeui/kmenubar.cpp6
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 ) );