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

Method handleOutput

src/client.cpp:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void waybar::Client::handleOutput(struct waybar_output& output) {
38 static const struct zxdg_output_v1_listener xdgOutputListener = {
39 .logical_position = [](void*, struct zxdg_output_v1*, int32_t, int32_t) {},
40 .logical_size = [](void*, struct zxdg_output_v1*, int32_t, int32_t) {},
41 .done = &handleOutputDone,
42 .name = &handleOutputName,
43 .description = &handleOutputDescription,
44 };
45 // owned by output->monitor; no need to destroy
46 auto* wl_output = gdk_wayland_monitor_get_wl_output(output.monitor->gobj());
47 output.xdg_output.reset(zxdg_output_manager_v1_get_xdg_output(xdg_output_manager, wl_output));
48 zxdg_output_v1_add_listener(output.xdg_output.get(), &xdgOutputListener, &output);
49}
50
51struct waybar::waybar_output& waybar::Client::getOutput(void* addr) {
52 auto it = std::find_if(outputs_.begin(), outputs_.end(),

Callers

nothing calls this directly

Calls 2

resetMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected