From f330f504d71392e33bbd593b4597779e52518746 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 2 Nov 2007 02:21:13 +0000 Subject: [PATCH] try to figure out what the top left screen is for the default panel svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=731846 --- corona.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/corona.cpp b/corona.cpp index 9f8240e8b..a73cdb42a 100644 --- a/corona.cpp +++ b/corona.cpp @@ -220,17 +220,26 @@ void Corona::loadDefaultSetup() QDesktopWidget desktop; int numScreens = desktop.numScreens(); kDebug() << "number of screens is" << numScreens; + int topLeftScreen = 0; + QPoint topLeftCorner = desktop.screenGeometry(0).topLeft(); + // create a containment for each screen for (int i = 0; i < numScreens; ++i) { - kDebug() << " screen " << i << "geometry is" << desktop.screenGeometry(i); + QRect g = desktop.screenGeometry(i); + kDebug() << " screen " << i << "geometry is" << g; Containment* c = addContainment("desktop"); c->setScreen(i); c->setFormFactor(Plasma::Planar); + + if (g.x() <= topLeftCorner.x() && g.y() <= topLeftCorner.y()) { + topLeftCorner = g.topLeft(); + topLeftScreen = i; + } } // make a panel at the bottom Containment* panel = addContainment("panel"); - panel->setScreen(0); + panel->setScreen(topLeftScreen); panel->setLocation(Plasma::BottomEdge); // some default applets to get a usable UI