mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 01:32:42 +01:00 
			
		
		
		
	Making idle_inhibitor_ private and initialised in constructor, as it was before.
This commit is contained in:
		@@ -12,12 +12,12 @@ class IdleInhibitor : public ALabel {
 | 
				
			|||||||
  IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
 | 
					  IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
 | 
				
			||||||
  ~IdleInhibitor();
 | 
					  ~IdleInhibitor();
 | 
				
			||||||
  auto update() -> void;
 | 
					  auto update() -> void;
 | 
				
			||||||
  struct zwp_idle_inhibitor_v1*       idle_inhibitor_ = nullptr;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 private:
 | 
					 private:
 | 
				
			||||||
  bool handleToggle(GdkEventButton* const& e);
 | 
					  bool handleToggle(GdkEventButton* const& e);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const Bar&                    bar_;
 | 
					  const Bar&                    bar_;
 | 
				
			||||||
 | 
					  struct zwp_idle_inhibitor_v1* idle_inhibitor_;
 | 
				
			||||||
  int                           pid_;
 | 
					  int                           pid_;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,6 +5,7 @@ waybar::modules::IdleInhibitor::IdleInhibitor(const std::string& id, const Bar&
 | 
				
			|||||||
                                              const Json::Value& config)
 | 
					                                              const Json::Value& config)
 | 
				
			||||||
    : ALabel(config, "idle_inhibitor", id, "{status}"),
 | 
					    : ALabel(config, "idle_inhibitor", id, "{status}"),
 | 
				
			||||||
      bar_(bar),
 | 
					      bar_(bar),
 | 
				
			||||||
 | 
					      idle_inhibitor_(nullptr),
 | 
				
			||||||
      pid_(-1) {
 | 
					      pid_(-1) {
 | 
				
			||||||
  event_box_.add_events(Gdk::BUTTON_PRESS_MASK);
 | 
					  event_box_.add_events(Gdk::BUTTON_PRESS_MASK);
 | 
				
			||||||
  event_box_.signal_button_press_event().connect(
 | 
					  event_box_.signal_button_press_event().connect(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user