Gather support information about screens

Adds a section about screens to supportInformation containing:
* whether multi-head is used
* in case of multi-head the screen number
* the number of screens
* geometry per screen

That should hopefully end the two often asked questions about the user's
screen setup, especially if they say they use multi-head.

REVIEW: 108363
icc-effect-5.14.5
Martin Gräßlin 2013-01-12 09:54:24 +01:00
parent 88f998a924
commit a1c76f4df2
1 changed files with 20 additions and 0 deletions

View File

@ -82,6 +82,7 @@ namespace KWin
{
extern int screen_number;
extern bool is_multihead;
static const int KWIN_MAX_NUMBER_DESKTOPS = 20;
#ifdef KWIN_BUILD_KAPPMENU
@ -2196,6 +2197,25 @@ QString Workspace::supportInformation() const
}
support.append(QLatin1String(property.name()) % ": " % options->property(property.name()).toString() % '\n');
}
support.append("\nScreens\n");
support.append( "=======\n");
support.append("Multi-Head: ");
if (is_multihead) {
support.append("yes\n");
support.append(QString("Head: %1\n").arg(screen_number));
} else {
support.append("no\n");
}
support.append(QString("Number of Screens: %1\n").arg(QApplication::desktop()->screenCount()));
for (int i=0; i<QApplication::desktop()->screenCount(); ++i) {
const QRect geo = QApplication::desktop()->screenGeometry(i);
support.append(QString("Screen %1 Geometry: %2,%3,%4x%5\n")
.arg(i)
.arg(geo.x())
.arg(geo.y())
.arg(geo.width())
.arg(geo.height()));
}
support.append("\nCompositing\n");
support.append( "===========\n");
support.append("Qt Graphics System: ");