Commit 797ccca4 authored by Méven Car's avatar Méven Car
Browse files

Wayland: avoid binding disabled outputs to surfaces

We don't need to bind disabled outputs to surfaces that overlaps them.
This prevents error down the line and warnings about ignoring surface.enter events with Qt.

BUG: 419749
parent b267ea41
...@@ -628,6 +628,8 @@ void DrmOutput::dpmsFinishOff() ...@@ -628,6 +628,8 @@ void DrmOutput::dpmsFinishOff()
if (isEnabled()) { if (isEnabled()) {
waylandOutput()->setDpmsMode(toWaylandDpmsMode(m_dpmsModePending)); waylandOutput()->setDpmsMode(toWaylandDpmsMode(m_dpmsModePending));
m_backend->createDpmsFilter(); m_backend->createDpmsFilter();
} else {
waylandOutput()->setDpmsMode(toWaylandDpmsMode(DpmsMode::Off));
} }
} }
......
...@@ -1941,12 +1941,14 @@ void XdgShellClient::updateClientOutputs() ...@@ -1941,12 +1941,14 @@ void XdgShellClient::updateClientOutputs()
{ {
QVector<OutputInterface *> clientOutputs; QVector<OutputInterface *> clientOutputs;
const auto outputs = waylandServer()->display()->outputs(); const auto outputs = waylandServer()->display()->outputs();
for (OutputInterface *output : outputs) { for (const auto output : outputs) {
if (output->isEnabled()) {
const QRect outputGeometry(output->globalPosition(), output->pixelSize() / output->scale()); const QRect outputGeometry(output->globalPosition(), output->pixelSize() / output->scale());
if (frameGeometry().intersects(outputGeometry)) { if (frameGeometry().intersects(outputGeometry)) {
clientOutputs << output; clientOutputs << output;
} }
} }
}
surface()->setOutputs(clientOutputs); surface()->setOutputs(clientOutputs);
} }
......
Markdown is supported
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