fix: prevent duplicate layer surfaces on monitor hotplug
The monitor signal handlers (signal_monitor_added, signal_monitor_removed) were never disconnected during SIGUSR2 reload. Each reload accumulated additional handlers, causing multiple layer surfaces to be created when monitors were hotplugged. This fix: - Stores signal connections as class members - Disconnects them before reconnecting in bindInterfaces() - Clears stale outputs_ on reload
This commit is contained in:
@ -56,6 +56,8 @@ class Client {
|
||||
std::list<struct waybar_output> outputs_;
|
||||
std::unique_ptr<CssReloadHelper> m_cssReloadHelper;
|
||||
std::string m_cssFile;
|
||||
sigc::connection monitor_added_connection_;
|
||||
sigc::connection monitor_removed_connection_;
|
||||
};
|
||||
|
||||
} // namespace waybar
|
||||
|
||||
Reference in New Issue
Block a user