Commit 584b1b48 authored by Méven Car's avatar Méven Car
Browse files

Add OutputInterface::isEnabled

parent da1da0db
......@@ -517,6 +517,12 @@ QVector<wl_resource *> OutputInterface::clientResources(ClientConnection *client
return ret;
}
bool OutputInterface::isEnabled() const
{
Q_D();
return d->dpms.mode == DpmsMode::On;
}
OutputInterface *OutputInterface::get(wl_resource* native)
{
return Private::get(native);
......
......@@ -116,6 +116,12 @@ public:
**/
QVector<wl_resource *> clientResources(ClientConnection *client) const;
/**
* Returns @c true if the output is on; otherwise returns false.
* @since 5.20
*/
bool isEnabled() const;
static OutputInterface *get(wl_resource *native);
Q_SIGNALS:
......
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