Commit 8115b1c7 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

wayland: Partially revert 797ccca4

If an output is turned off, the client will receive a leave event. In
that case, many applications will re-compute the new buffer scale and
provide a new buffer.

If the dpms mode changes, for example due to being idle for too long,
clients should ideally do nothing, i.e. don't repaint their surfaces, etc.

If an output is disabled for good, the corresponding wl_output will be
removed, and the clients will receive wl_surface::leave prior to that.
parent 34271430
......@@ -165,11 +165,9 @@ void WaylandClient::updateClientOutputs()
QVector<OutputInterface *> clientOutputs;
const auto outputs = waylandServer()->display()->outputs();
for (const auto output : outputs) {
if (output->isEnabled()) {
const QRect outputGeometry(output->globalPosition(), output->pixelSize() / output->scale());
if (frameGeometry().intersects(outputGeometry)) {
clientOutputs << output;
}
const QRect outputGeometry(output->globalPosition(), output->pixelSize() / output->scale());
if (frameGeometry().intersects(outputGeometry)) {
clientOutputs << output;
}
}
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