| 102 | } |
| 103 | |
| 104 | void waybar::Client::handleOutputDescription(void* data, struct zxdg_output_v1* /*xdg_output*/, |
| 105 | const char* description) { |
| 106 | auto* client = waybar::Client::inst(); |
| 107 | try { |
| 108 | auto& output = client->getOutput(data); |
| 109 | |
| 110 | // Description format: "identifier (name)" |
| 111 | auto s = std::string(description); |
| 112 | auto pos = s.find(" ("); |
| 113 | output.identifier = pos != std::string::npos ? s.substr(0, pos) : s; |
| 114 | } catch (const std::exception& e) { |
| 115 | spdlog::warn("caught exception in zxdg_output_v1_listener::description: {}", e.what()); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | void waybar::Client::handleMonitorAdded(Glib::RefPtr<Gdk::Monitor> monitor) { |
| 120 | auto& output = outputs_.emplace_back(); |
nothing calls this directly
no outgoing calls
no test coverage detected