chore: upgrade to clang-format@21
This commit is contained in:
@ -20,8 +20,8 @@ uint32_t WorkspaceManager::group_global_id = 0;
|
||||
uint32_t WorkspaceManager::workspace_global_id = 0;
|
||||
std::map<std::string, std::string> Workspace::icon_map_;
|
||||
|
||||
WorkspaceManager::WorkspaceManager(const std::string &id, const waybar::Bar &bar,
|
||||
const Json::Value &config)
|
||||
WorkspaceManager::WorkspaceManager(const std::string& id, const waybar::Bar& bar,
|
||||
const Json::Value& config)
|
||||
: waybar::AModule(config, "workspaces", id, false, false), bar_(bar), box_(bar.orientation, 0) {
|
||||
add_registry_listener(this);
|
||||
|
||||
@ -70,7 +70,7 @@ WorkspaceManager::~WorkspaceManager() {
|
||||
groups_.clear();
|
||||
|
||||
if (ext_manager_ != nullptr) {
|
||||
auto *display = Client::inst()->wl_display;
|
||||
auto* display = Client::inst()->wl_display;
|
||||
// Send `stop` request and wait for one roundtrip.
|
||||
ext_workspace_manager_v1_stop(ext_manager_);
|
||||
wl_display_roundtrip(display);
|
||||
@ -84,7 +84,7 @@ WorkspaceManager::~WorkspaceManager() {
|
||||
spdlog::debug("[ext/workspaces]: Workspace manager destroyed");
|
||||
}
|
||||
|
||||
void WorkspaceManager::register_manager(wl_registry *registry, uint32_t name, uint32_t version) {
|
||||
void WorkspaceManager::register_manager(wl_registry* registry, uint32_t name, uint32_t version) {
|
||||
if (ext_manager_ != nullptr) {
|
||||
spdlog::warn("[ext/workspaces]: Register workspace manager again although already registered!");
|
||||
return;
|
||||
@ -99,7 +99,7 @@ void WorkspaceManager::register_manager(wl_registry *registry, uint32_t name, ui
|
||||
|
||||
void WorkspaceManager::remove_workspace_group(uint32_t id) {
|
||||
const auto it =
|
||||
std::find_if(groups_.begin(), groups_.end(), [id](const auto &g) { return g->id() == id; });
|
||||
std::find_if(groups_.begin(), groups_.end(), [id](const auto& g) { return g->id() == id; });
|
||||
|
||||
if (it == groups_.end()) {
|
||||
spdlog::warn("[ext/workspaces]: Can't find workspace group with id {}", id);
|
||||
@ -111,7 +111,7 @@ void WorkspaceManager::remove_workspace_group(uint32_t id) {
|
||||
|
||||
void WorkspaceManager::remove_workspace(uint32_t id) {
|
||||
const auto it = std::find_if(workspaces_.begin(), workspaces_.end(),
|
||||
[id](const auto &w) { return w->id() == id; });
|
||||
[id](const auto& w) { return w->id() == id; });
|
||||
|
||||
if (it == workspaces_.end()) {
|
||||
spdlog::warn("[ext/workspaces]: Can't find workspace with id {}", id);
|
||||
@ -121,13 +121,13 @@ void WorkspaceManager::remove_workspace(uint32_t id) {
|
||||
workspaces_.erase(it);
|
||||
}
|
||||
|
||||
void WorkspaceManager::handle_workspace_group(ext_workspace_group_handle_v1 *handle) {
|
||||
void WorkspaceManager::handle_workspace_group(ext_workspace_group_handle_v1* handle) {
|
||||
const auto new_id = ++group_global_id;
|
||||
groups_.push_back(std::make_unique<WorkspaceGroup>(*this, handle, new_id));
|
||||
spdlog::debug("[ext/workspaces]: Workspace group {} created", new_id);
|
||||
}
|
||||
|
||||
void WorkspaceManager::handle_workspace(ext_workspace_handle_v1 *handle) {
|
||||
void WorkspaceManager::handle_workspace(ext_workspace_handle_v1* handle) {
|
||||
const auto new_id = ++workspace_global_id;
|
||||
const auto new_name = std::to_string(++workspace_name);
|
||||
workspaces_.push_back(std::make_unique<Workspace>(config_, *this, handle, new_id, new_name));
|
||||
@ -158,7 +158,7 @@ void WorkspaceManager::update() {
|
||||
AModule::update();
|
||||
}
|
||||
|
||||
bool WorkspaceManager::has_button(const Gtk::Button *button) {
|
||||
bool WorkspaceManager::has_button(const Gtk::Button* button) {
|
||||
const auto buttons = box_.get_children();
|
||||
return std::find(buttons.begin(), buttons.end(), button) != buttons.end();
|
||||
}
|
||||
@ -166,20 +166,20 @@ bool WorkspaceManager::has_button(const Gtk::Button *button) {
|
||||
void WorkspaceManager::sort_workspaces() {
|
||||
// determine if workspace ID's and names can be sort numerically or literally
|
||||
|
||||
auto is_numeric = [](const std::string &s) {
|
||||
auto is_numeric = [](const std::string& s) {
|
||||
return !s.empty() && std::all_of(s.begin(), s.end(), ::isdigit);
|
||||
};
|
||||
|
||||
auto sort_by_workspace_id_numerically =
|
||||
std::all_of(workspaces_.begin(), workspaces_.end(),
|
||||
[&](const auto &w) { return is_numeric(w->workspace_id()); });
|
||||
[&](const auto& w) { return is_numeric(w->workspace_id()); });
|
||||
|
||||
auto sort_by_name_numerically = std::all_of(workspaces_.begin(), workspaces_.end(),
|
||||
[&](const auto &w) { return is_numeric(w->name()); });
|
||||
[&](const auto& w) { return is_numeric(w->name()); });
|
||||
|
||||
// sort based on configuration setting with sort-by-id as fallback
|
||||
|
||||
std::sort(workspaces_.begin(), workspaces_.end(), [&](const auto &w1, const auto &w2) {
|
||||
std::sort(workspaces_.begin(), workspaces_.end(), [&](const auto& w1, const auto& w2) {
|
||||
if (sort_by_id_ || (!sort_by_name_ && !sort_by_coordinates_)) {
|
||||
if (w1->workspace_id() == w2->workspace_id()) {
|
||||
return w1->id() < w2->id();
|
||||
@ -218,7 +218,7 @@ void WorkspaceManager::sort_workspaces() {
|
||||
}
|
||||
|
||||
void WorkspaceManager::clear_buttons() {
|
||||
for (const auto &workspace : workspaces_) {
|
||||
for (const auto& workspace : workspaces_) {
|
||||
if (has_button(&workspace->button())) {
|
||||
box_.remove(workspace->button());
|
||||
}
|
||||
@ -226,13 +226,13 @@ void WorkspaceManager::clear_buttons() {
|
||||
}
|
||||
|
||||
void WorkspaceManager::update_buttons() {
|
||||
const auto *output = gdk_wayland_monitor_get_wl_output(bar_.output->monitor->gobj());
|
||||
const auto* output = gdk_wayland_monitor_get_wl_output(bar_.output->monitor->gobj());
|
||||
|
||||
// go through all workspace
|
||||
|
||||
for (const auto &workspace : workspaces_) {
|
||||
for (const auto& workspace : workspaces_) {
|
||||
const bool workspace_on_any_group_for_output =
|
||||
std::any_of(groups_.begin(), groups_.end(), [&](const auto &group) {
|
||||
std::any_of(groups_.begin(), groups_.end(), [&](const auto& group) {
|
||||
const bool group_on_output = group->has_output(output) || all_outputs_;
|
||||
const bool workspace_on_group = group->has_workspace(workspace->handle());
|
||||
return group_on_output && workspace_on_group;
|
||||
@ -259,7 +259,7 @@ void WorkspaceManager::update_buttons() {
|
||||
|
||||
// WorkspaceGroup
|
||||
|
||||
WorkspaceGroup::WorkspaceGroup(WorkspaceManager &manager, ext_workspace_group_handle_v1 *handle,
|
||||
WorkspaceGroup::WorkspaceGroup(WorkspaceManager& manager, ext_workspace_group_handle_v1* handle,
|
||||
uint32_t id)
|
||||
: workspaces_manager_(manager), ext_handle_(handle), id_(id) {
|
||||
add_workspace_group_listener(ext_handle_, this);
|
||||
@ -272,11 +272,11 @@ WorkspaceGroup::~WorkspaceGroup() {
|
||||
spdlog::debug("[ext/workspaces]: Workspace group {} destroyed", id_);
|
||||
}
|
||||
|
||||
bool WorkspaceGroup::has_output(const wl_output *output) {
|
||||
bool WorkspaceGroup::has_output(const wl_output* output) {
|
||||
return std::find(outputs_.begin(), outputs_.end(), output) != outputs_.end();
|
||||
}
|
||||
|
||||
bool WorkspaceGroup::has_workspace(const ext_workspace_handle_v1 *workspace) {
|
||||
bool WorkspaceGroup::has_workspace(const ext_workspace_handle_v1* workspace) {
|
||||
return std::find(workspaces_.begin(), workspaces_.end(), workspace) != workspaces_.end();
|
||||
}
|
||||
|
||||
@ -288,20 +288,20 @@ void WorkspaceGroup::handle_capabilities(uint32_t capabilities) {
|
||||
}
|
||||
}
|
||||
|
||||
void WorkspaceGroup::handle_output_enter(wl_output *output) { outputs_.push_back(output); }
|
||||
void WorkspaceGroup::handle_output_enter(wl_output* output) { outputs_.push_back(output); }
|
||||
|
||||
void WorkspaceGroup::handle_output_leave(wl_output *output) {
|
||||
void WorkspaceGroup::handle_output_leave(wl_output* output) {
|
||||
const auto it = std::find(outputs_.begin(), outputs_.end(), output);
|
||||
if (it != outputs_.end()) {
|
||||
outputs_.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
void WorkspaceGroup::handle_workspace_enter(ext_workspace_handle_v1 *handle) {
|
||||
void WorkspaceGroup::handle_workspace_enter(ext_workspace_handle_v1* handle) {
|
||||
workspaces_.push_back(handle);
|
||||
}
|
||||
|
||||
void WorkspaceGroup::handle_workspace_leave(ext_workspace_handle_v1 *handle) {
|
||||
void WorkspaceGroup::handle_workspace_leave(ext_workspace_handle_v1* handle) {
|
||||
const auto it = std::find(workspaces_.begin(), workspaces_.end(), handle);
|
||||
if (it != workspaces_.end()) {
|
||||
workspaces_.erase(it);
|
||||
@ -315,30 +315,30 @@ void WorkspaceGroup::handle_removed() {
|
||||
|
||||
// Workspace
|
||||
|
||||
Workspace::Workspace(const Json::Value &config, WorkspaceManager &manager,
|
||||
ext_workspace_handle_v1 *handle, uint32_t id, const std::string &name)
|
||||
Workspace::Workspace(const Json::Value& config, WorkspaceManager& manager,
|
||||
ext_workspace_handle_v1* handle, uint32_t id, const std::string& name)
|
||||
: workspace_manager_(manager), ext_handle_(handle), id_(id), workspace_id_(name), name_(name) {
|
||||
add_workspace_listener(ext_handle_, this);
|
||||
|
||||
// parse configuration
|
||||
|
||||
const auto &config_active_only = config["active-only"];
|
||||
const auto& config_active_only = config["active-only"];
|
||||
if (config_active_only.isBool()) {
|
||||
active_only_ = config_active_only.asBool();
|
||||
}
|
||||
|
||||
const auto &config_ignore_hidden = config["ignore-hidden"];
|
||||
const auto& config_ignore_hidden = config["ignore-hidden"];
|
||||
if (config_ignore_hidden.isBool()) {
|
||||
ignore_hidden_ = config_ignore_hidden.asBool();
|
||||
}
|
||||
|
||||
const auto &config_format = config["format"];
|
||||
const auto& config_format = config["format"];
|
||||
format_ = config_format.isString() ? config_format.asString() : "{name}";
|
||||
with_icon_ = format_.find("{icon}") != std::string::npos;
|
||||
|
||||
if (with_icon_ && icon_map_.empty()) {
|
||||
const auto &format_icons = config["format-icons"];
|
||||
for (auto &n : format_icons.getMemberNames()) {
|
||||
const auto& format_icons = config["format-icons"];
|
||||
for (auto& n : format_icons.getMemberNames()) {
|
||||
icon_map_.emplace(n, format_icons[n].asString());
|
||||
}
|
||||
}
|
||||
@ -413,19 +413,19 @@ void Workspace::update() {
|
||||
fmt::arg("icon", with_icon_ ? icon() : "")));
|
||||
}
|
||||
|
||||
void Workspace::handle_id(const std::string &id) {
|
||||
void Workspace::handle_id(const std::string& id) {
|
||||
spdlog::debug("[ext/workspaces]: ID for workspace {}: {}", id_, id);
|
||||
workspace_id_ = id;
|
||||
workspace_manager_.set_needs_sorting();
|
||||
}
|
||||
|
||||
void Workspace::handle_name(const std::string &name) {
|
||||
void Workspace::handle_name(const std::string& name) {
|
||||
spdlog::debug("[ext/workspaces]: Name for workspace {}: {}", id_, name);
|
||||
name_ = name;
|
||||
workspace_manager_.set_needs_sorting();
|
||||
}
|
||||
|
||||
void Workspace::handle_coordinates(const std::vector<uint32_t> &coordinates) {
|
||||
void Workspace::handle_coordinates(const std::vector<uint32_t>& coordinates) {
|
||||
coordinates_ = coordinates;
|
||||
workspace_manager_.set_needs_sorting();
|
||||
}
|
||||
@ -453,7 +453,7 @@ void Workspace::handle_removed() {
|
||||
workspace_manager_.remove_workspace(id_);
|
||||
}
|
||||
|
||||
bool Workspace::handle_clicked(const GdkEventButton *button) const {
|
||||
bool Workspace::handle_clicked(const GdkEventButton* button) const {
|
||||
std::string action;
|
||||
if (button->button == GDK_BUTTON_PRIMARY) {
|
||||
action = on_click_action_;
|
||||
|
||||
@ -9,44 +9,44 @@
|
||||
|
||||
namespace waybar::modules::ext {
|
||||
|
||||
static void handle_global(void *data, wl_registry *registry, uint32_t name, const char *interface,
|
||||
static void handle_global(void* data, wl_registry* registry, uint32_t name, const char* interface,
|
||||
uint32_t version) {
|
||||
if (std::strcmp(interface, ext_workspace_manager_v1_interface.name) == 0) {
|
||||
static_cast<WorkspaceManager *>(data)->register_manager(registry, name, version);
|
||||
static_cast<WorkspaceManager*>(data)->register_manager(registry, name, version);
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_global_remove(void *data, wl_registry *registry, uint32_t name) {
|
||||
static void handle_global_remove(void* data, wl_registry* registry, uint32_t name) {
|
||||
/* Nothing to do here */
|
||||
}
|
||||
|
||||
static const wl_registry_listener registry_listener_impl = {.global = handle_global,
|
||||
.global_remove = handle_global_remove};
|
||||
|
||||
void add_registry_listener(void *data) {
|
||||
wl_display *display = Client::inst()->wl_display;
|
||||
wl_registry *registry = wl_display_get_registry(display);
|
||||
void add_registry_listener(void* data) {
|
||||
wl_display* display = Client::inst()->wl_display;
|
||||
wl_registry* registry = wl_display_get_registry(display);
|
||||
|
||||
wl_registry_add_listener(registry, ®istry_listener_impl, data);
|
||||
wl_display_roundtrip(display);
|
||||
}
|
||||
|
||||
static void workspace_manager_handle_workspace_group(
|
||||
void *data, ext_workspace_manager_v1 *_, ext_workspace_group_handle_v1 *workspace_group) {
|
||||
static_cast<WorkspaceManager *>(data)->handle_workspace_group(workspace_group);
|
||||
void* data, ext_workspace_manager_v1* _, ext_workspace_group_handle_v1* workspace_group) {
|
||||
static_cast<WorkspaceManager*>(data)->handle_workspace_group(workspace_group);
|
||||
}
|
||||
|
||||
static void workspace_manager_handle_workspace(void *data, ext_workspace_manager_v1 *_,
|
||||
ext_workspace_handle_v1 *workspace) {
|
||||
static_cast<WorkspaceManager *>(data)->handle_workspace(workspace);
|
||||
static void workspace_manager_handle_workspace(void* data, ext_workspace_manager_v1* _,
|
||||
ext_workspace_handle_v1* workspace) {
|
||||
static_cast<WorkspaceManager*>(data)->handle_workspace(workspace);
|
||||
}
|
||||
|
||||
static void workspace_manager_handle_done(void *data, ext_workspace_manager_v1 *_) {
|
||||
static_cast<WorkspaceManager *>(data)->handle_done();
|
||||
static void workspace_manager_handle_done(void* data, ext_workspace_manager_v1* _) {
|
||||
static_cast<WorkspaceManager*>(data)->handle_done();
|
||||
}
|
||||
|
||||
static void workspace_manager_handle_finished(void *data, ext_workspace_manager_v1 *_) {
|
||||
static_cast<WorkspaceManager *>(data)->handle_finished();
|
||||
static void workspace_manager_handle_finished(void* data, ext_workspace_manager_v1* _) {
|
||||
static_cast<WorkspaceManager*>(data)->handle_finished();
|
||||
}
|
||||
|
||||
static const ext_workspace_manager_v1_listener workspace_manager_impl = {
|
||||
@ -56,9 +56,9 @@ static const ext_workspace_manager_v1_listener workspace_manager_impl = {
|
||||
.finished = workspace_manager_handle_finished,
|
||||
};
|
||||
|
||||
ext_workspace_manager_v1 *workspace_manager_bind(wl_registry *registry, uint32_t name,
|
||||
uint32_t version, void *data) {
|
||||
auto *workspace_manager = static_cast<ext_workspace_manager_v1 *>(
|
||||
ext_workspace_manager_v1* workspace_manager_bind(wl_registry* registry, uint32_t name,
|
||||
uint32_t version, void* data) {
|
||||
auto* workspace_manager = static_cast<ext_workspace_manager_v1*>(
|
||||
wl_registry_bind(registry, name, &ext_workspace_manager_v1_interface, version));
|
||||
|
||||
if (workspace_manager)
|
||||
@ -69,33 +69,33 @@ ext_workspace_manager_v1 *workspace_manager_bind(wl_registry *registry, uint32_t
|
||||
return workspace_manager;
|
||||
}
|
||||
|
||||
static void workspace_group_handle_capabilities(void *data, ext_workspace_group_handle_v1 *_,
|
||||
static void workspace_group_handle_capabilities(void* data, ext_workspace_group_handle_v1* _,
|
||||
uint32_t capabilities) {
|
||||
static_cast<WorkspaceGroup *>(data)->handle_capabilities(capabilities);
|
||||
static_cast<WorkspaceGroup*>(data)->handle_capabilities(capabilities);
|
||||
}
|
||||
|
||||
static void workspace_group_handle_output_enter(void *data, ext_workspace_group_handle_v1 *_,
|
||||
wl_output *output) {
|
||||
static_cast<WorkspaceGroup *>(data)->handle_output_enter(output);
|
||||
static void workspace_group_handle_output_enter(void* data, ext_workspace_group_handle_v1* _,
|
||||
wl_output* output) {
|
||||
static_cast<WorkspaceGroup*>(data)->handle_output_enter(output);
|
||||
}
|
||||
|
||||
static void workspace_group_handle_output_leave(void *data, ext_workspace_group_handle_v1 *_,
|
||||
wl_output *output) {
|
||||
static_cast<WorkspaceGroup *>(data)->handle_output_leave(output);
|
||||
static void workspace_group_handle_output_leave(void* data, ext_workspace_group_handle_v1* _,
|
||||
wl_output* output) {
|
||||
static_cast<WorkspaceGroup*>(data)->handle_output_leave(output);
|
||||
}
|
||||
|
||||
static void workspace_group_handle_workspace_enter(void *data, ext_workspace_group_handle_v1 *_,
|
||||
ext_workspace_handle_v1 *workspace) {
|
||||
static_cast<WorkspaceGroup *>(data)->handle_workspace_enter(workspace);
|
||||
static void workspace_group_handle_workspace_enter(void* data, ext_workspace_group_handle_v1* _,
|
||||
ext_workspace_handle_v1* workspace) {
|
||||
static_cast<WorkspaceGroup*>(data)->handle_workspace_enter(workspace);
|
||||
}
|
||||
|
||||
static void workspace_group_handle_workspace_leave(void *data, ext_workspace_group_handle_v1 *_,
|
||||
ext_workspace_handle_v1 *workspace) {
|
||||
static_cast<WorkspaceGroup *>(data)->handle_workspace_leave(workspace);
|
||||
static void workspace_group_handle_workspace_leave(void* data, ext_workspace_group_handle_v1* _,
|
||||
ext_workspace_handle_v1* workspace) {
|
||||
static_cast<WorkspaceGroup*>(data)->handle_workspace_leave(workspace);
|
||||
}
|
||||
|
||||
static void workspace_group_handle_removed(void *data, ext_workspace_group_handle_v1 *_) {
|
||||
static_cast<WorkspaceGroup *>(data)->handle_removed();
|
||||
static void workspace_group_handle_removed(void* data, ext_workspace_group_handle_v1* _) {
|
||||
static_cast<WorkspaceGroup*>(data)->handle_removed();
|
||||
}
|
||||
|
||||
static const ext_workspace_group_handle_v1_listener workspace_group_impl = {
|
||||
@ -106,43 +106,43 @@ static const ext_workspace_group_handle_v1_listener workspace_group_impl = {
|
||||
.workspace_leave = workspace_group_handle_workspace_leave,
|
||||
.removed = workspace_group_handle_removed};
|
||||
|
||||
void add_workspace_group_listener(ext_workspace_group_handle_v1 *workspace_group_handle,
|
||||
void *data) {
|
||||
void add_workspace_group_listener(ext_workspace_group_handle_v1* workspace_group_handle,
|
||||
void* data) {
|
||||
ext_workspace_group_handle_v1_add_listener(workspace_group_handle, &workspace_group_impl, data);
|
||||
}
|
||||
|
||||
void workspace_handle_name(void *data, struct ext_workspace_handle_v1 *_, const char *name) {
|
||||
static_cast<Workspace *>(data)->handle_name(name);
|
||||
void workspace_handle_name(void* data, struct ext_workspace_handle_v1* _, const char* name) {
|
||||
static_cast<Workspace*>(data)->handle_name(name);
|
||||
}
|
||||
|
||||
void workspace_handle_id(void *data, struct ext_workspace_handle_v1 *_, const char *id) {
|
||||
static_cast<Workspace *>(data)->handle_id(id);
|
||||
void workspace_handle_id(void* data, struct ext_workspace_handle_v1* _, const char* id) {
|
||||
static_cast<Workspace*>(data)->handle_id(id);
|
||||
}
|
||||
|
||||
void workspace_handle_coordinates(void *data, struct ext_workspace_handle_v1 *_,
|
||||
struct wl_array *coordinates) {
|
||||
void workspace_handle_coordinates(void* data, struct ext_workspace_handle_v1* _,
|
||||
struct wl_array* coordinates) {
|
||||
std::vector<uint32_t> coords_vec;
|
||||
auto coords = static_cast<uint32_t *>(coordinates->data);
|
||||
auto coords = static_cast<uint32_t*>(coordinates->data);
|
||||
for (size_t i = 0; i < coordinates->size / sizeof(uint32_t); ++i) {
|
||||
coords_vec.push_back(coords[i]);
|
||||
}
|
||||
|
||||
static_cast<Workspace *>(data)->handle_coordinates(coords_vec);
|
||||
static_cast<Workspace*>(data)->handle_coordinates(coords_vec);
|
||||
}
|
||||
|
||||
void workspace_handle_state(void *data, struct ext_workspace_handle_v1 *workspace_handle,
|
||||
void workspace_handle_state(void* data, struct ext_workspace_handle_v1* workspace_handle,
|
||||
uint32_t state) {
|
||||
static_cast<Workspace *>(data)->handle_state(state);
|
||||
static_cast<Workspace*>(data)->handle_state(state);
|
||||
}
|
||||
|
||||
static void workspace_handle_capabilities(void *data,
|
||||
struct ext_workspace_handle_v1 *workspace_handle,
|
||||
static void workspace_handle_capabilities(void* data,
|
||||
struct ext_workspace_handle_v1* workspace_handle,
|
||||
uint32_t capabilities) {
|
||||
static_cast<Workspace *>(data)->handle_capabilities(capabilities);
|
||||
static_cast<Workspace*>(data)->handle_capabilities(capabilities);
|
||||
}
|
||||
|
||||
void workspace_handle_removed(void *data, struct ext_workspace_handle_v1 *workspace_handle) {
|
||||
static_cast<Workspace *>(data)->handle_removed();
|
||||
void workspace_handle_removed(void* data, struct ext_workspace_handle_v1* workspace_handle) {
|
||||
static_cast<Workspace*>(data)->handle_removed();
|
||||
}
|
||||
|
||||
static const ext_workspace_handle_v1_listener workspace_impl = {
|
||||
@ -153,7 +153,7 @@ static const ext_workspace_handle_v1_listener workspace_impl = {
|
||||
.capabilities = workspace_handle_capabilities,
|
||||
.removed = workspace_handle_removed};
|
||||
|
||||
void add_workspace_listener(ext_workspace_handle_v1 *workspace_handle, void *data) {
|
||||
void add_workspace_listener(ext_workspace_handle_v1* workspace_handle, void* data) {
|
||||
ext_workspace_handle_v1_add_listener(workspace_handle, &workspace_impl, data);
|
||||
}
|
||||
} // namespace waybar::modules::ext
|
||||
|
||||
Reference in New Issue
Block a user