Changeset View
Changeset View
Standalone View
Standalone View
idle_inhibition.cpp
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 87 | if (it == m_idleInhibitors.end()) { | |||
---|---|---|---|---|---|
89 | return; | 89 | return; | ||
90 | } | 90 | } | ||
91 | m_idleInhibitors.erase(it); | 91 | m_idleInhibitors.erase(it); | ||
92 | m_idle->uninhibit(); | 92 | m_idle->uninhibit(); | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | void IdleInhibition::update(AbstractClient *client) | 95 | void IdleInhibition::update(AbstractClient *client) | ||
96 | { | 96 | { | ||
97 | if (client->isInternal()) { | ||||
98 | return; | ||||
99 | } | ||||
100 | | ||||
97 | // TODO: Don't honor the idle inhibitor object if the shell client is not | 101 | // TODO: Don't honor the idle inhibitor object if the shell client is not | ||
98 | // on the current activity (currently, activities are not supported). | 102 | // on the current activity (currently, activities are not supported). | ||
99 | const bool visible = client->isShown(true) && client->isOnCurrentDesktop(); | 103 | const bool visible = client->isShown(true) && client->isOnCurrentDesktop(); | ||
100 | if (visible && client->surface()->inhibitsIdle()) { | 104 | if (visible && client->surface()->inhibitsIdle()) { | ||
101 | inhibit(client); | 105 | inhibit(client); | ||
102 | } else { | 106 | } else { | ||
103 | uninhibit(client); | 107 | uninhibit(client); | ||
104 | } | 108 | } | ||
Show All 13 Lines |