Moving idle inhibitor shared stuff out of Client and into idle_inhibitor module as static members.

This commit is contained in:
Jordan Leppert
2020-11-01 17:09:48 +00:00
parent c6743988d3
commit 071cb86b45
3 changed files with 11 additions and 8 deletions

View File

@@ -23,8 +23,6 @@ class Client {
struct zxdg_output_manager_v1 * xdg_output_manager = nullptr;
struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager = nullptr;
std::list<waybar::AModule*> idle_inhibitor_modules;
std::string idle_inhibitor_status = "deactivated";
std::vector<std::unique_ptr<Bar>> bars;

View File

@@ -12,6 +12,8 @@ class IdleInhibitor : public ALabel {
IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
~IdleInhibitor();
auto update() -> void;
static std::list<waybar::AModule*> idle_inhibitor_modules;
static std::string idle_inhibitor_status;
private:
bool handleToggle(GdkEventButton* const& e);