Browse Source

Fix incorrect state

Fix up f3f9cfe44e.
adaptive-webui-19844
Chocobo1 1 year ago
parent
commit
1874fd7f93
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 8
      src/gui/powermanagement/powermanagement_x11.cpp

8
src/gui/powermanagement/powermanagement_x11.cpp

@ -80,15 +80,15 @@ void PowerManagementInhibitor::requestIdle() @@ -80,15 +80,15 @@ void PowerManagementInhibitor::requestIdle()
if ((m_state == Error) || (m_state == Idle) || (m_state == RequestIdle) || (m_state == RequestBusy))
return;
m_state = RequestIdle;
if (m_manager == ManagerType::Systemd)
{
QDBusUnixFileDescriptor dummy;
m_fd.swap(dummy);
m_fd = {};
m_state = Idle;
return;
}
m_state = RequestIdle;
const QString method = (m_manager == ManagerType::Gnome)
? u"Uninhibit"_s
: u"UnInhibit"_s;

Loading…
Cancel
Save