Fixed QScreen::name() return value on xcb.
Previously the primary sceen number wasn't stripped before adding the actual screen number, resulting in names such as ":0.0.0". Change-Id: Ifbcf12dcf1c200fd6bc5e4b95a5d82483957e0d2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
ce4fb74ecd
commit
63e56b90c5
@ -367,7 +367,11 @@ QPixmap QXcbScreen::grabWindow(WId window, int x, int y, int width, int height)
|
|||||||
|
|
||||||
QString QXcbScreen::name() const
|
QString QXcbScreen::name() const
|
||||||
{
|
{
|
||||||
return connection()->displayName() + QLatin1String(".") + QString::number(screenNumber());
|
QByteArray displayName = connection()->displayName();
|
||||||
|
int dotPos = displayName.lastIndexOf('.');
|
||||||
|
if (dotPos != -1)
|
||||||
|
displayName.truncate(dotPos);
|
||||||
|
return displayName + QLatin1Char('.') + QString::number(screenNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
Loading…
Reference in New Issue
Block a user