waybar/include/modules/idle_inhibitor.hpp
Jonas 80ef63791d [bugfix] idle_inhibitor handles click events correctly
- Declare event handler in ALabel virtual so the idle_inhibitor can
  overriding them
- Handle the right click event in idle_inhibitor and call ALabel handler if needed
2019-03-03 22:02:34 +01:00

24 lines
470 B
C++

#pragma once
#include <fmt/format.h>
#include "bar.hpp"
#include "client.hpp"
#include "ALabel.hpp"
namespace waybar::modules {
class IdleInhibitor: public ALabel {
public:
IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
~IdleInhibitor();
auto update() -> void;
private:
bool handleToggle(GdkEventButton* const& e);
const Bar& bar_;
std::string status_;
struct zwp_idle_inhibitor_v1 *idle_inhibitor_;
};
}