Commit 018177b5 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Limit VRR policy in support information only to Wayland session

Adaptive sync is only supported on Wayland.

BUG: 436623
parent caaabf84
......@@ -279,7 +279,9 @@ RenderLoop::VrrPolicy Screens::vrrPolicy(int screen) const
return RenderLoop::VrrPolicy::Never;
#else
if (auto output = findOutput(screen)) {
return output->renderLoop()->vrrPolicy();
if (auto waylandOutput = dynamic_cast<AbstractWaylandOutput *>(output)) {
return waylandOutput->vrrPolicy();
}
}
return RenderLoop::VrrPolicy::Never;
#endif
......
......@@ -1538,21 +1538,23 @@ QString Workspace::supportInformation() const
.arg(geo.height()));
support.append(QStringLiteral("Scale: %1\n").arg(screens()->scale(i)));
support.append(QStringLiteral("Refresh Rate: %1\n").arg(screens()->refreshRate(i)));
QString vrr = QStringLiteral("incapable");
if (screens()->isVrrCapable(i)) {
switch(screens()->vrrPolicy(i)) {
case RenderLoop::VrrPolicy::Never:
vrr = QStringLiteral("never");
break;
case RenderLoop::VrrPolicy::Always:
vrr = QStringLiteral("always");
break;
case RenderLoop::VrrPolicy::Automatic:
vrr = QStringLiteral("automatic");
break;
if (waylandServer()) {
QString vrr = QStringLiteral("incapable");
if (screens()->isVrrCapable(i)) {
switch(screens()->vrrPolicy(i)) {
case RenderLoop::VrrPolicy::Never:
vrr = QStringLiteral("never");
break;
case RenderLoop::VrrPolicy::Always:
vrr = QStringLiteral("always");
break;
case RenderLoop::VrrPolicy::Automatic:
vrr = QStringLiteral("automatic");
break;
}
}
support.append(QStringLiteral("Adaptive Sync: %1\n").arg(vrr));
}
support.append(QStringLiteral("Adaptive Sync: %1\n").arg(vrr));
}
support.append(QStringLiteral("\nCompositing\n"));
support.append(QStringLiteral( "===========\n"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment