Changeset View
Changeset View
Standalone View
Standalone View
idle_inhibition.h
Show All 31 Lines | |||||
32 | } | 32 | } | ||
33 | } | 33 | } | ||
34 | 34 | | |||
35 | using KWayland::Server::IdleInterface; | 35 | using KWayland::Server::IdleInterface; | ||
36 | 36 | | |||
37 | namespace KWin | 37 | namespace KWin | ||
38 | { | 38 | { | ||
39 | class AbstractClient; | 39 | class AbstractClient; | ||
40 | class XdgShellClient; | | |||
41 | 40 | | |||
42 | class IdleInhibition : public QObject | 41 | class IdleInhibition : public QObject | ||
43 | { | 42 | { | ||
44 | Q_OBJECT | 43 | Q_OBJECT | ||
45 | public: | 44 | public: | ||
46 | explicit IdleInhibition(IdleInterface *idle); | 45 | explicit IdleInhibition(IdleInterface *idle); | ||
47 | ~IdleInhibition() override; | 46 | ~IdleInhibition() override; | ||
48 | 47 | | |||
49 | void registerXdgShellClient(XdgShellClient *client); | 48 | void registerClient(AbstractClient *client); | ||
50 | 49 | | |||
51 | bool isInhibited() const { | 50 | bool isInhibited() const { | ||
52 | return !m_idleInhibitors.isEmpty(); | 51 | return !m_idleInhibitors.isEmpty(); | ||
53 | } | 52 | } | ||
54 | bool isInhibited(AbstractClient *client) const { | 53 | bool isInhibited(AbstractClient *client) const { | ||
55 | return m_idleInhibitors.contains(client); | 54 | return m_idleInhibitors.contains(client); | ||
56 | } | 55 | } | ||
57 | 56 | | |||
Show All 14 Lines |