Drop Platform::enabledOutputs()
At the moment, a platform should provide two output lists - one that lists all available outputs, and the other one that contains only enabled outputs. In general, this amounts to some boilerplate code and forces backends to be implemented in some certain way, which sometimes is inconvenient, e.g. if an output is disabled or enabled, it will be simpler if we only change Output::isEnabled(), otherwise we need to start accounting for corner cases such as the order in which Output::isEnabled() and Platform::enabledOutputs() are changed, etc.
This commit is contained in:
parent
2629007eef
commit
a198516871
22 changed files with 94 additions and 95 deletions
|
@ -140,7 +140,7 @@ void WaylandTestApplication::performStartup()
|
||||||
createInput();
|
createInput();
|
||||||
createVirtualInputDevices();
|
createVirtualInputDevices();
|
||||||
|
|
||||||
if (!platform()->enabledOutputs().isEmpty()) {
|
if (!platform()->outputs().isEmpty()) {
|
||||||
continueStartupWithScreens();
|
continueStartupWithScreens();
|
||||||
} else {
|
} else {
|
||||||
connect(platform(), &Platform::screensQueried, this, &WaylandTestApplication::continueStartupWithScreens);
|
connect(platform(), &Platform::screensQueried, this, &WaylandTestApplication::continueStartupWithScreens);
|
||||||
|
|
|
@ -152,7 +152,7 @@ void ScreensTest::testCurrent_data()
|
||||||
void ScreensTest::testCurrent()
|
void ScreensTest::testCurrent()
|
||||||
{
|
{
|
||||||
QFETCH(int, currentId);
|
QFETCH(int, currentId);
|
||||||
Output *output = kwinApp()->platform()->enabledOutputs().at(currentId);
|
Output *output = workspace()->outputs().at(currentId);
|
||||||
|
|
||||||
// Disable "active screen follows mouse"
|
// Disable "active screen follows mouse"
|
||||||
auto group = kwinApp()->config()->group("Windows");
|
auto group = kwinApp()->config()->group("Windows");
|
||||||
|
@ -197,7 +197,7 @@ void ScreensTest::testCurrentWithFollowsMouse()
|
||||||
KWin::Cursors::self()->mouse()->setPos(cursorPos);
|
KWin::Cursors::self()->mouse()->setPos(cursorPos);
|
||||||
|
|
||||||
QFETCH(int, expectedId);
|
QFETCH(int, expectedId);
|
||||||
Output *expected = kwinApp()->platform()->enabledOutputs().at(expectedId);
|
Output *expected = workspace()->outputs().at(expectedId);
|
||||||
QCOMPARE(workspace()->activeOutput(), expected);
|
QCOMPARE(workspace()->activeOutput(), expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ void ScreensTest::testCurrentPoint()
|
||||||
workspace()->setActiveOutput(cursorPos);
|
workspace()->setActiveOutput(cursorPos);
|
||||||
|
|
||||||
QFETCH(int, expectedId);
|
QFETCH(int, expectedId);
|
||||||
Output *expected = kwinApp()->platform()->enabledOutputs().at(expectedId);
|
Output *expected = workspace()->outputs().at(expectedId);
|
||||||
QCOMPARE(workspace()->activeOutput(), expected);
|
QCOMPARE(workspace()->activeOutput(), expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,11 +108,6 @@ Outputs DrmBackend::outputs() const
|
||||||
return m_outputs;
|
return m_outputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
Outputs DrmBackend::enabledOutputs() const
|
|
||||||
{
|
|
||||||
return m_enabledOutputs;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DrmBackend::createDpmsFilter()
|
void DrmBackend::createDpmsFilter()
|
||||||
{
|
{
|
||||||
if (m_dpmsFilter) {
|
if (m_dpmsFilter) {
|
||||||
|
|
|
@ -54,7 +54,6 @@ public:
|
||||||
bool initialize() override;
|
bool initialize() override;
|
||||||
|
|
||||||
Outputs outputs() const override;
|
Outputs outputs() const override;
|
||||||
Outputs enabledOutputs() const override;
|
|
||||||
|
|
||||||
void enableOutput(DrmAbstractOutput *output, bool enable);
|
void enableOutput(DrmAbstractOutput *output, bool enable);
|
||||||
|
|
||||||
|
|
|
@ -522,14 +522,15 @@ void Connection::applyScreenToDevice(Device *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
Output *deviceOutput = nullptr;
|
Output *deviceOutput = nullptr;
|
||||||
const QVector<Output *> outputs = kwinApp()->platform()->enabledOutputs();
|
const QVector<Output *> outputs = kwinApp()->platform()->outputs();
|
||||||
|
|
||||||
// let's try to find a screen for it
|
// let's try to find a screen for it
|
||||||
if (outputs.count() == 1) {
|
if (!device->outputName().isEmpty()) {
|
||||||
deviceOutput = outputs.constFirst();
|
|
||||||
}
|
|
||||||
if (!deviceOutput && !device->outputName().isEmpty()) {
|
|
||||||
// we have an output name, try to find a screen with matching name
|
// we have an output name, try to find a screen with matching name
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
|
if (!output->isEnabled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (output->name() == device->outputName()) {
|
if (output->name() == device->outputName()) {
|
||||||
deviceOutput = output;
|
deviceOutput = output;
|
||||||
break;
|
break;
|
||||||
|
@ -540,6 +541,9 @@ void Connection::applyScreenToDevice(Device *device)
|
||||||
// do we have an internal screen?
|
// do we have an internal screen?
|
||||||
Output *internalOutput = nullptr;
|
Output *internalOutput = nullptr;
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
|
if (!output->isEnabled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (output->isInternal()) {
|
if (output->isInternal()) {
|
||||||
internalOutput = output;
|
internalOutput = output;
|
||||||
break;
|
break;
|
||||||
|
@ -556,6 +560,9 @@ void Connection::applyScreenToDevice(Device *device)
|
||||||
}
|
}
|
||||||
// let's compare all screens for size
|
// let's compare all screens for size
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
|
if (!output->isEnabled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (testScreenMatches(output)) {
|
if (testScreenMatches(output)) {
|
||||||
deviceOutput = output;
|
deviceOutput = output;
|
||||||
break;
|
break;
|
||||||
|
@ -566,9 +573,14 @@ void Connection::applyScreenToDevice(Device *device)
|
||||||
if (internalOutput) {
|
if (internalOutput) {
|
||||||
// we have an internal id, so let's use that
|
// we have an internal id, so let's use that
|
||||||
deviceOutput = internalOutput;
|
deviceOutput = internalOutput;
|
||||||
} else if (!outputs.isEmpty()) {
|
} else {
|
||||||
|
for (Output *output : outputs) {
|
||||||
// just take first screen, we have no clue
|
// just take first screen, we have no clue
|
||||||
deviceOutput = outputs.constFirst();
|
if (output->isEnabled()) {
|
||||||
|
deviceOutput = output;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -647,8 +647,11 @@ void Device::setOutputName(const QString &name)
|
||||||
setOutput(nullptr);
|
setOutput(nullptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto outputs = kwinApp()->platform()->enabledOutputs();
|
auto outputs = kwinApp()->platform()->outputs();
|
||||||
for (int i = 0; i < outputs.count(); ++i) {
|
for (int i = 0; i < outputs.count(); ++i) {
|
||||||
|
if (!outputs[i]->isEnabled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (outputs[i]->name() == name) {
|
if (outputs[i]->name() == name) {
|
||||||
setOutput(outputs[i]);
|
setOutput(outputs[i]);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -87,11 +87,6 @@ Outputs VirtualBackend::outputs() const
|
||||||
return m_outputs;
|
return m_outputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
Outputs VirtualBackend::enabledOutputs() const
|
|
||||||
{
|
|
||||||
return m_outputsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VirtualBackend::setVirtualOutputs(int count, QVector<QRect> geometries, QVector<int> scales)
|
void VirtualBackend::setVirtualOutputs(int count, QVector<QRect> geometries, QVector<int> scales)
|
||||||
{
|
{
|
||||||
Q_ASSERT(geometries.size() == 0 || geometries.size() == count);
|
Q_ASSERT(geometries.size() == 0 || geometries.size() == count);
|
||||||
|
|
|
@ -44,7 +44,6 @@ public:
|
||||||
Q_INVOKABLE void setVirtualOutputs(int count, QVector<QRect> geometries = QVector<QRect>(), QVector<int> scales = QVector<int>());
|
Q_INVOKABLE void setVirtualOutputs(int count, QVector<QRect> geometries = QVector<QRect>(), QVector<int> scales = QVector<int>());
|
||||||
|
|
||||||
Outputs outputs() const override;
|
Outputs outputs() const override;
|
||||||
Outputs enabledOutputs() const override;
|
|
||||||
|
|
||||||
QVector<CompositingType> supportedCompositors() const override
|
QVector<CompositingType> supportedCompositors() const override
|
||||||
{
|
{
|
||||||
|
|
|
@ -120,10 +120,12 @@ void VirtualEglBackend::init()
|
||||||
setSupportsBufferAge(false);
|
setSupportsBufferAge(false);
|
||||||
initWayland();
|
initWayland();
|
||||||
|
|
||||||
const auto outputs = m_backend->enabledOutputs();
|
const auto outputs = m_backend->outputs();
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
|
if (output->isEnabled()) {
|
||||||
addOutput(output);
|
addOutput(output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
connect(m_backend, &VirtualBackend::outputEnabled, this, &VirtualEglBackend::addOutput);
|
connect(m_backend, &VirtualBackend::outputEnabled, this, &VirtualEglBackend::addOutput);
|
||||||
connect(m_backend, &VirtualBackend::outputDisabled, this, &VirtualEglBackend::removeOutput);
|
connect(m_backend, &VirtualBackend::outputDisabled, this, &VirtualEglBackend::removeOutput);
|
||||||
|
|
|
@ -50,11 +50,13 @@ VirtualQPainterBackend::VirtualQPainterBackend(VirtualBackend *backend)
|
||||||
connect(backend, &VirtualBackend::outputEnabled, this, &VirtualQPainterBackend::addOutput);
|
connect(backend, &VirtualBackend::outputEnabled, this, &VirtualQPainterBackend::addOutput);
|
||||||
connect(backend, &VirtualBackend::outputDisabled, this, &VirtualQPainterBackend::removeOutput);
|
connect(backend, &VirtualBackend::outputDisabled, this, &VirtualQPainterBackend::removeOutput);
|
||||||
|
|
||||||
const auto outputs = backend->enabledOutputs();
|
const auto outputs = backend->outputs();
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
|
if (output->isEnabled()) {
|
||||||
addOutput(output);
|
addOutput(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
VirtualQPainterBackend::~VirtualQPainterBackend() = default;
|
VirtualQPainterBackend::~VirtualQPainterBackend() = default;
|
||||||
|
|
||||||
|
|
|
@ -942,17 +942,6 @@ Outputs WaylandBackend::outputs() const
|
||||||
return m_outputs;
|
return m_outputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
Outputs WaylandBackend::enabledOutputs() const
|
|
||||||
{
|
|
||||||
Outputs ret;
|
|
||||||
for (auto o : m_outputs) {
|
|
||||||
if (o->isEnabled()) {
|
|
||||||
ret << o;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void WaylandBackend::addConfiguredOutput(WaylandOutput *output)
|
void WaylandBackend::addConfiguredOutput(WaylandOutput *output)
|
||||||
{
|
{
|
||||||
m_outputs << output;
|
m_outputs << output;
|
||||||
|
|
|
@ -289,7 +289,6 @@ public:
|
||||||
WaylandOutput *getOutputAt(const QPointF &globalPosition);
|
WaylandOutput *getOutputAt(const QPointF &globalPosition);
|
||||||
WaylandOutput *findOutput(KWayland::Client::Surface *nativeSurface) const;
|
WaylandOutput *findOutput(KWayland::Client::Surface *nativeSurface) const;
|
||||||
Outputs outputs() const override;
|
Outputs outputs() const override;
|
||||||
Outputs enabledOutputs() const override;
|
|
||||||
QVector<WaylandOutput *> waylandOutputs() const
|
QVector<WaylandOutput *> waylandOutputs() const
|
||||||
{
|
{
|
||||||
return m_outputs;
|
return m_outputs;
|
||||||
|
|
|
@ -638,11 +638,6 @@ Outputs X11StandalonePlatform::outputs() const
|
||||||
return m_outputs;
|
return m_outputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
Outputs X11StandalonePlatform::enabledOutputs() const
|
|
||||||
{
|
|
||||||
return m_outputs;
|
|
||||||
}
|
|
||||||
|
|
||||||
RenderLoop *X11StandalonePlatform::renderLoop() const
|
RenderLoop *X11StandalonePlatform::renderLoop() const
|
||||||
{
|
{
|
||||||
return m_renderLoop.get();
|
return m_renderLoop.get();
|
||||||
|
@ -660,7 +655,7 @@ static int currentRefreshRate()
|
||||||
return refreshRate;
|
return refreshRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QVector<Output *> outputs = kwinApp()->platform()->enabledOutputs();
|
const QVector<Output *> outputs = kwinApp()->platform()->outputs();
|
||||||
if (outputs.isEmpty()) {
|
if (outputs.isEmpty()) {
|
||||||
return 60000;
|
return 60000;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,6 @@ public:
|
||||||
|
|
||||||
RenderLoop *renderLoop() const;
|
RenderLoop *renderLoop() const;
|
||||||
Outputs outputs() const override;
|
Outputs outputs() const override;
|
||||||
Outputs enabledOutputs() const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -696,9 +696,4 @@ Outputs X11WindowedBackend::outputs() const
|
||||||
return m_outputs;
|
return m_outputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
Outputs X11WindowedBackend::enabledOutputs() const
|
} // namespace KWin
|
||||||
{
|
|
||||||
return m_outputs;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -131,7 +131,6 @@ public:
|
||||||
X11WindowedInputDevice *touchDevice() const;
|
X11WindowedInputDevice *touchDevice() const;
|
||||||
|
|
||||||
Outputs outputs() const override;
|
Outputs outputs() const override;
|
||||||
Outputs enabledOutputs() const override;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void sizeChanged();
|
void sizeChanged();
|
||||||
|
|
|
@ -50,10 +50,12 @@ X11WindowedQPainterBackend::X11WindowedQPainterBackend(X11WindowedBackend *backe
|
||||||
: QPainterBackend()
|
: QPainterBackend()
|
||||||
, m_backend(backend)
|
, m_backend(backend)
|
||||||
{
|
{
|
||||||
const auto outputs = m_backend->enabledOutputs();
|
const auto outputs = m_backend->outputs();
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
|
if (output->isEnabled()) {
|
||||||
addOutput(output);
|
addOutput(output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
connect(backend, &X11WindowedBackend::outputEnabled, this, &X11WindowedQPainterBackend::addOutput);
|
connect(backend, &X11WindowedBackend::outputEnabled, this, &X11WindowedQPainterBackend::addOutput);
|
||||||
connect(backend, &X11WindowedBackend::outputDisabled, this, &X11WindowedQPainterBackend::removeOutput);
|
connect(backend, &X11WindowedBackend::outputDisabled, this, &X11WindowedQPainterBackend::removeOutput);
|
||||||
|
|
|
@ -26,10 +26,12 @@ ColorManager::ColorManager()
|
||||||
{
|
{
|
||||||
Platform *platform = kwinApp()->platform();
|
Platform *platform = kwinApp()->platform();
|
||||||
|
|
||||||
const QVector<Output *> outputs = platform->enabledOutputs();
|
const QVector<Output *> outputs = platform->outputs();
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
|
if (output->isEnabled()) {
|
||||||
handleOutputEnabled(output);
|
handleOutputEnabled(output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
connect(platform, &Platform::outputEnabled, this, &ColorManager::handleOutputEnabled);
|
connect(platform, &Platform::outputEnabled, this, &ColorManager::handleOutputEnabled);
|
||||||
connect(platform, &Platform::outputDisabled, this, &ColorManager::handleOutputDisabled);
|
connect(platform, &Platform::outputDisabled, this, &ColorManager::handleOutputDisabled);
|
||||||
|
|
|
@ -49,7 +49,15 @@ Platform::Platform(QObject *parent)
|
||||||
{
|
{
|
||||||
connect(this, &Platform::outputDisabled, this, [this](Output *output) {
|
connect(this, &Platform::outputDisabled, this, [this](Output *output) {
|
||||||
if (m_primaryOutput == output) {
|
if (m_primaryOutput == output) {
|
||||||
setPrimaryOutput(enabledOutputs().value(0, nullptr));
|
Output *primary = nullptr;
|
||||||
|
const auto candidates = outputs();
|
||||||
|
for (Output *output : candidates) {
|
||||||
|
if (output->isEnabled()) {
|
||||||
|
primary = output;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setPrimaryOutput(primary);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(this, &Platform::outputEnabled, this, [this](Output *output) {
|
connect(this, &Platform::outputEnabled, this, [this](Output *output) {
|
||||||
|
@ -170,7 +178,14 @@ void Platform::requestOutputsChange(KWaylandServer::OutputConfigurationV2Interfa
|
||||||
if (requestedPrimaryOutput && requestedPrimaryOutput->isEnabled()) {
|
if (requestedPrimaryOutput && requestedPrimaryOutput->isEnabled()) {
|
||||||
setPrimaryOutput(requestedPrimaryOutput);
|
setPrimaryOutput(requestedPrimaryOutput);
|
||||||
} else {
|
} else {
|
||||||
auto defaultPrimaryOutput = enabledOutputs().constFirst();
|
Output *defaultPrimaryOutput = nullptr;
|
||||||
|
const auto candidates = outputs();
|
||||||
|
for (Output *output : candidates) {
|
||||||
|
if (output->isEnabled()) {
|
||||||
|
defaultPrimaryOutput = output;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
qCWarning(KWIN_CORE) << "Requested invalid primary screen, using" << defaultPrimaryOutput;
|
qCWarning(KWIN_CORE) << "Requested invalid primary screen, using" << defaultPrimaryOutput;
|
||||||
setPrimaryOutput(defaultPrimaryOutput);
|
setPrimaryOutput(defaultPrimaryOutput);
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,16 +300,10 @@ public:
|
||||||
return m_supportsGammaControl;
|
return m_supportsGammaControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// outputs with connections (org_kde_kwin_outputdevice)
|
|
||||||
virtual Outputs outputs() const
|
virtual Outputs outputs() const
|
||||||
{
|
{
|
||||||
return Outputs();
|
return Outputs();
|
||||||
}
|
}
|
||||||
// actively compositing outputs (wl_output)
|
|
||||||
virtual Outputs enabledOutputs() const
|
|
||||||
{
|
|
||||||
return Outputs();
|
|
||||||
}
|
|
||||||
Output *findOutput(const QUuid &uuid) const;
|
Output *findOutput(const QUuid &uuid) const;
|
||||||
Output *findOutput(const QString &name) const;
|
Output *findOutput(const QString &name) const;
|
||||||
|
|
||||||
|
|
|
@ -290,13 +290,11 @@ void WaylandServer::initPlatform()
|
||||||
const QVector<Output *> outputs = kwinApp()->platform()->outputs();
|
const QVector<Output *> outputs = kwinApp()->platform()->outputs();
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
handleOutputAdded(output);
|
handleOutputAdded(output);
|
||||||
}
|
if (output->isEnabled()) {
|
||||||
|
|
||||||
const QVector<Output *> enabledOutputs = kwinApp()->platform()->enabledOutputs();
|
|
||||||
for (Output *output : enabledOutputs) {
|
|
||||||
handleOutputEnabled(output);
|
handleOutputEnabled(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void WaylandServer::handleOutputAdded(Output *output)
|
void WaylandServer::handleOutputAdded(Output *output)
|
||||||
{
|
{
|
||||||
|
|
|
@ -209,10 +209,12 @@ void Workspace::init()
|
||||||
connect(platform, &Platform::outputEnabled, this, &Workspace::slotOutputEnabled);
|
connect(platform, &Platform::outputEnabled, this, &Workspace::slotOutputEnabled);
|
||||||
connect(platform, &Platform::outputDisabled, this, &Workspace::slotOutputDisabled);
|
connect(platform, &Platform::outputDisabled, this, &Workspace::slotOutputDisabled);
|
||||||
|
|
||||||
const QVector<Output *> outputs = platform->enabledOutputs();
|
const QVector<Output *> outputs = platform->outputs();
|
||||||
for (Output *output : outputs) {
|
for (Output *output : outputs) {
|
||||||
|
if (output->isEnabled()) {
|
||||||
slotOutputEnabled(output);
|
slotOutputEnabled(output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Screens *screens = Screens::self();
|
Screens *screens = Screens::self();
|
||||||
screens->init();
|
screens->init();
|
||||||
|
@ -1572,7 +1574,7 @@ QString Workspace::supportInformation() const
|
||||||
} else {
|
} else {
|
||||||
support.append(QStringLiteral(" no\n"));
|
support.append(QStringLiteral(" no\n"));
|
||||||
}
|
}
|
||||||
const QVector<Output *> outputs = kwinApp()->platform()->enabledOutputs();
|
const QVector<Output *> outputs = kwinApp()->platform()->outputs();
|
||||||
support.append(QStringLiteral("Number of Screens: %1\n\n").arg(outputs.count()));
|
support.append(QStringLiteral("Number of Screens: %1\n\n").arg(outputs.count()));
|
||||||
for (int i = 0; i < outputs.count(); ++i) {
|
for (int i = 0; i < outputs.count(); ++i) {
|
||||||
const auto output = outputs[i];
|
const auto output = outputs[i];
|
||||||
|
@ -1580,6 +1582,8 @@ QString Workspace::supportInformation() const
|
||||||
support.append(QStringLiteral("Screen %1:\n").arg(i));
|
support.append(QStringLiteral("Screen %1:\n").arg(i));
|
||||||
support.append(QStringLiteral("---------\n"));
|
support.append(QStringLiteral("---------\n"));
|
||||||
support.append(QStringLiteral("Name: %1\n").arg(output->name()));
|
support.append(QStringLiteral("Name: %1\n").arg(output->name()));
|
||||||
|
support.append(QStringLiteral("Enabled: %1\n").arg(output->isEnabled()));
|
||||||
|
if (output->isEnabled()) {
|
||||||
support.append(QStringLiteral("Geometry: %1,%2,%3x%4\n")
|
support.append(QStringLiteral("Geometry: %1,%2,%3x%4\n")
|
||||||
.arg(geo.x())
|
.arg(geo.x())
|
||||||
.arg(geo.y())
|
.arg(geo.y())
|
||||||
|
@ -1603,6 +1607,7 @@ QString Workspace::supportInformation() const
|
||||||
}
|
}
|
||||||
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("\nCompositing\n"));
|
||||||
support.append(QStringLiteral("===========\n"));
|
support.append(QStringLiteral("===========\n"));
|
||||||
if (effects) {
|
if (effects) {
|
||||||
|
|
Loading…
Reference in a new issue