MCPcopy Create free account
hub / github.com/Alexays/Waybar / handleDeferredMonitorRemoval

Method handleDeferredMonitorRemoval

src/client.cpp:137–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void waybar::Client::handleDeferredMonitorRemoval(Glib::RefPtr<Gdk::Monitor> monitor) {
138 for (auto it = bars.begin(); it != bars.end();) {
139 if ((*it)->output->monitor == monitor) {
140 auto output_name = (*it)->output->name;
141 (*it)->window.hide();
142 gtk_app->remove_window((*it)->window);
143 it = bars.erase(it);
144 spdlog::info("Bar removed from output: {}", output_name);
145 } else {
146 ++it;
147 }
148 }
149 outputs_.remove_if([&monitor](const auto& output) { return output.monitor == monitor; });
150}
151
152const std::string waybar::Client::getStyle(const std::string& style,
153 std::optional<Appearance> appearance = std::nullopt) {

Callers

nothing calls this directly

Calls 3

hideMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected