diff --git a/metadata/meson.build b/metadata/meson.build index 73b50c9ed..e822960ca 100644 --- a/metadata/meson.build +++ b/metadata/meson.build @@ -7,6 +7,7 @@ install_data('core.xml', install_dir: conf_data.get('PLUGIN_XML_DIR')) install_data('cube.xml', install_dir: conf_data.get('PLUGIN_XML_DIR')) install_data('decoration.xml', install_dir: conf_data.get('PLUGIN_XML_DIR')) install_data('expo.xml', install_dir: conf_data.get('PLUGIN_XML_DIR')) +install_data('ext-toplevel.xml', install_dir: conf_data.get('PLUGIN_XML_DIR')) install_data('extra-gestures.xml', install_dir: conf_data.get('PLUGIN_XML_DIR')) install_data('fast-switcher.xml', install_dir: conf_data.get('PLUGIN_XML_DIR')) install_data('foreign-toplevel.xml', install_dir: conf_data.get('PLUGIN_XML_DIR')) diff --git a/plugins/protocols/ext-toplevel.cpp b/plugins/protocols/ext-toplevel.cpp index a7b28d5e5..186184606 100644 --- a/plugins/protocols/ext-toplevel.cpp +++ b/plugins/protocols/ext-toplevel.cpp @@ -14,6 +14,11 @@ #include "toplevel-common.hpp" +extern "C" +{ +#include +} + class wayfire_foreign_toplevel; using foreign_toplevel_map_type = std::map>; @@ -129,6 +134,13 @@ class wayfire_ext_foreign_toplevel_protocol_impl : public wf::plugin_interface_t wf::get_core().connect(&on_view_mapped); wf::get_core().connect(&on_view_unmapped); + + for (auto& view : wf::get_core().get_all_views()) + { + wf::view_mapped_signal data{}; + data.view = view; + on_view_mapped.emit(&data); + } } void fini() override @@ -160,6 +172,7 @@ class wayfire_ext_foreign_toplevel_protocol_impl : public wf::plugin_interface_t } handle_for_view[toplevel] = std::make_unique(toplevel, handle); + handle->data = ev->view.get(); } }; diff --git a/src/api/wayfire/core.hpp b/src/api/wayfire/core.hpp index 4bcf8d69e..1f5441fd6 100644 --- a/src/api/wayfire/core.hpp +++ b/src/api/wayfire/core.hpp @@ -167,10 +167,8 @@ class compositor_core_t : public wf::object_base_t, public signal::provider_t wlr_data_control_manager_v1 *data_control; wlr_gamma_control_manager_v1 *gamma_v1; wlr_screencopy_manager_v1 *screencopy; - wlr_ext_foreign_toplevel_list_v1 *foreign_toplevel_list; wlr_ext_image_copy_capture_manager_v1 *image_copy_capture; wlr_ext_output_image_capture_source_manager_v1 *output_image_capture_source; - wlr_ext_foreign_toplevel_image_capture_source_manager_v1 *foreign_toplevel_image_capture_source; wlr_export_dmabuf_manager_v1 *export_dmabuf; wlr_server_decoration_manager *decorator_manager; wlr_xdg_decoration_manager_v1 *xdg_decorator; diff --git a/src/api/wayfire/nonstd/wlroots-full.hpp b/src/api/wayfire/nonstd/wlroots-full.hpp index a425334d7..0c873644e 100644 --- a/src/api/wayfire/nonstd/wlroots-full.hpp +++ b/src/api/wayfire/nonstd/wlroots-full.hpp @@ -57,7 +57,6 @@ extern "C" #include #include #include -#include #if __has_include() #include #include diff --git a/src/api/wayfire/nonstd/wlroots.hpp b/src/api/wayfire/nonstd/wlroots.hpp index 47502dce1..35242da22 100644 --- a/src/api/wayfire/nonstd/wlroots.hpp +++ b/src/api/wayfire/nonstd/wlroots.hpp @@ -28,10 +28,8 @@ extern "C" struct wlr_virtual_pointer_manager_v1; struct wlr_idle_notifier_v1; struct wlr_screencopy_manager_v1; - struct wlr_ext_foreign_toplevel_list_v1; struct wlr_ext_image_copy_capture_manager_v1; struct wlr_ext_output_image_capture_source_manager_v1; - struct wlr_ext_foreign_toplevel_image_capture_source_manager_v1; struct wlr_foreign_toplevel_manager_v1; struct wlr_pointer_gestures_v1; struct wlr_relative_pointer_manager_v1; diff --git a/src/api/wayfire/plugin.hpp b/src/api/wayfire/plugin.hpp index 040334b86..df56e1f3d 100644 --- a/src/api/wayfire/plugin.hpp +++ b/src/api/wayfire/plugin.hpp @@ -107,7 +107,7 @@ using wayfire_plugin_load_func = wf::plugin_interface_t * (*)(); /** * The version is defined as macro as well, to allow conditional compilation. */ -#define WAYFIRE_API_ABI_VERSION_MACRO 2026'05'24 +#define WAYFIRE_API_ABI_VERSION_MACRO 2026'06'11 /** * The version of Wayfire's API/ABI diff --git a/src/core/core.cpp b/src/core/core.cpp index c49edf113..f6b50e3d0 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -145,11 +145,8 @@ void wf::compositor_core_impl_t::init() seat = std::make_unique(display, "default"); protocols.screencopy = wlr_screencopy_manager_v1_create(display); - protocols.foreign_toplevel_list = wlr_ext_foreign_toplevel_list_v1_create(display, 1); - protocols.image_copy_capture = wlr_ext_image_copy_capture_manager_v1_create(display, 1); + protocols.image_copy_capture = wlr_ext_image_copy_capture_manager_v1_create(display, 1); protocols.output_image_capture_source = wlr_ext_output_image_capture_source_manager_v1_create(display, 1); - protocols.foreign_toplevel_image_capture_source = - wlr_ext_foreign_toplevel_image_capture_source_manager_v1_create(display, 1); protocols.gamma_v1 = wlr_gamma_control_manager_v1_create(display); protocols.export_dmabuf = wlr_export_dmabuf_manager_v1_create(display); xdg_output_manager = std::make_unique(display,