backends/wayland: Fix a crash on shutdown
The wayland backend changes the dpms mode when the enabled state of the output changes. This creates problems when destroying all outputs on shut down. The wayland backend calls InputRedirection's methods, but InputRedirection is already destroyed by that time. While the crash can be fixed by guarding input() in createDpmsFilter() with an if statement, changing dpms mode in updateEnablement() doesn't seem like a good idea because Output changes unrelated states (enabled != dpms mode), so let's get rid of it.
This commit is contained in:
parent
3da3489aaa
commit
a513b795ad
1 changed files with 3 additions and 3 deletions
|
@ -77,11 +77,11 @@ void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixe
|
||||||
|
|
||||||
void WaylandOutput::updateEnablement(bool enable)
|
void WaylandOutput::updateEnablement(bool enable)
|
||||||
{
|
{
|
||||||
setDpmsMode(enable ? DpmsMode::On : DpmsMode::Off);
|
if (enable) {
|
||||||
if (enable)
|
|
||||||
Q_EMIT m_backend->outputEnabled(this);
|
Q_EMIT m_backend->outputEnabled(this);
|
||||||
else
|
} else {
|
||||||
Q_EMIT m_backend->outputDisabled(this);
|
Q_EMIT m_backend->outputDisabled(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaylandOutput::setDpmsMode(DpmsMode mode)
|
void WaylandOutput::setDpmsMode(DpmsMode mode)
|
||||||
|
|
Loading…
Reference in a new issue