Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions metadata/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
13 changes: 13 additions & 0 deletions plugins/protocols/ext-toplevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

#include "toplevel-common.hpp"

extern "C"
{
#include <wlr/types/wlr_ext_foreign_toplevel_list_v1.h>
}

class wayfire_foreign_toplevel;
using foreign_toplevel_map_type = std::map<wayfire_toplevel_view, std::unique_ptr<wayfire_foreign_toplevel>>;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -160,6 +172,7 @@ class wayfire_ext_foreign_toplevel_protocol_impl : public wf::plugin_interface_t
}

handle_for_view[toplevel] = std::make_unique<wayfire_ext_foreign_toplevel>(toplevel, handle);
handle->data = ev->view.get();
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/api/wayfire/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Comment thread
soreau marked this conversation as resolved.
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;
Expand Down
1 change: 0 additions & 1 deletion src/api/wayfire/nonstd/wlroots-full.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ extern "C"
#include <wlr/util/transform.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_ext_foreign_toplevel_list_v1.h>
#if __has_include(<ext-image-copy-capture-v1-protocol.h>)
#include <wlr/types/wlr_ext_image_copy_capture_v1.h>
#include <wlr/types/wlr_ext_image_capture_source_v1.h>
Expand Down
2 changes: 0 additions & 2 deletions src/api/wayfire/nonstd/wlroots.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/api/wayfire/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions src/core/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,8 @@ void wf::compositor_core_impl_t::init()
seat = std::make_unique<wf::seat_t>(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<wf::xdg_output_manager_v1>(display,
Expand Down
Loading