More display switching repairs

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1120415 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 15 years ago
parent 8949c3abab
commit 2dad7fde32

@ -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 ) );

Loading…
Cancel
Save