dpms: Make sure we are not calling the interface after the output is gone
It seems it's possible at times, as described in the bug. BUG: 466346
This commit is contained in:
parent
71956e1bb5
commit
fb3018b711
1 changed files with 8 additions and 0 deletions
|
@ -133,11 +133,19 @@ void DpmsInterface::org_kde_kwin_dpms_set(Resource *resource, uint32_t mode)
|
||||||
|
|
||||||
void DpmsInterface::sendSupported()
|
void DpmsInterface::sendSupported()
|
||||||
{
|
{
|
||||||
|
if (!m_output || m_output->isRemoved()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
send_supported(m_output->handle()->capabilities() & Output::Capability::Dpms ? 1 : 0);
|
send_supported(m_output->handle()->capabilities() & Output::Capability::Dpms ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DpmsInterface::sendMode()
|
void DpmsInterface::sendMode()
|
||||||
{
|
{
|
||||||
|
if (!m_output || m_output->isRemoved()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto mode = m_output->handle()->dpmsMode();
|
const auto mode = m_output->handle()->dpmsMode();
|
||||||
org_kde_kwin_dpms_mode wlMode;
|
org_kde_kwin_dpms_mode wlMode;
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
|
|
Loading…
Reference in a new issue