diff --git a/src/core/plugin-loader.cpp b/src/core/plugin-loader.cpp index b799d2ee3..76f8b0d5d 100644 --- a/src/core/plugin-loader.cpp +++ b/src/core/plugin-loader.cpp @@ -51,6 +51,7 @@ wf::plugin_manager_t::~plugin_manager_t() void wf::plugin_manager_t::destroy_plugin(wf::loaded_plugin_t& p) { + LOGD("Unloading plugin ", p.so_path); p.instance->fini(); p.instance.reset(); @@ -130,6 +131,7 @@ std::optional wf::plugin_manager_t::load_plugin_from_file(s loaded_plugin_t lp; lp.instance = std::unique_ptr(new_instance_func()); lp.so_handle = handle; + lp.so_path = path; return lp; } @@ -228,20 +230,21 @@ void wf::plugin_manager_t::reload_dynamic_plugins() } template -static wf::loaded_plugin_t create_plugin() +static wf::loaded_plugin_t create_plugin(std::string name) { wf::loaded_plugin_t lp; lp.instance = std::make_unique(); lp.so_handle = nullptr; + lp.so_path = name; lp.instance->init(); return lp; } void wf::plugin_manager_t::load_static_plugins() { - loaded_plugins["_exit"] = create_plugin>(); - loaded_plugins["_focus"] = create_plugin(); - loaded_plugins["_close"] = create_plugin>(); + loaded_plugins["_exit"] = create_plugin>("_exit"); + loaded_plugins["_focus"] = create_plugin("_focus"); + loaded_plugins["_close"] = create_plugin>("_close"); } std::vector wf::get_plugin_paths() diff --git a/src/core/plugin-loader.hpp b/src/core/plugin-loader.hpp index 4707dc70a..3888275d8 100644 --- a/src/core/plugin-loader.hpp +++ b/src/core/plugin-loader.hpp @@ -16,6 +16,9 @@ struct loaded_plugin_t // A handle returned by dlopen(). void *so_handle; + + // A path to the .so file of the plugin. + std::string so_path; }; struct plugin_manager_t diff --git a/src/output/workspace-impl.cpp b/src/output/workspace-impl.cpp index acd820b53..e9ccabb78 100644 --- a/src/output/workspace-impl.cpp +++ b/src/output/workspace-impl.cpp @@ -699,7 +699,6 @@ std::vector workspace_set_t::get_views(uint32_t flags, st void workspace_set_t::remove_view(wayfire_toplevel_view view) { - wf::print_trace(false); pimpl->remove_view(view); }