diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-29 03:39:54 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-29 03:39:54 +0000 |
commit | 2dad7fde32e8ea6ccc660f350182587e7e6b08e1 (patch) | |
tree | 5619b541a4ffae5ba082085fb5f4f5e2c3abf9fa | |
parent | 8949c3abab612ebf590983f9e7f439d8aafefa2a (diff) | |
download | tdelibs-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
-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 ) ); |