mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 18:09:49 +01:00
wlr_outputs: add wlr_addon_set
This commit is contained in:
parent
a6a80850b7
commit
11f799e88e
2 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <wayland-util.h>
|
||||
#include <wlr/render/dmabuf.h>
|
||||
#include <wlr/types/wlr_buffer.h>
|
||||
#include <wlr/util/addon.h>
|
||||
|
||||
struct wlr_output_mode {
|
||||
int32_t width, height;
|
||||
|
@ -184,6 +185,8 @@ struct wlr_output {
|
|||
|
||||
struct wl_listener display_destroy;
|
||||
|
||||
struct wlr_addon_set addons;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
|
|
|
@ -376,6 +376,8 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
|
|||
output->software_cursor_locks = 1;
|
||||
}
|
||||
|
||||
wlr_addon_set_init(&output->addons);
|
||||
|
||||
output->display_destroy.notify = handle_display_destroy;
|
||||
wl_display_add_destroy_listener(display, &output->display_destroy);
|
||||
}
|
||||
|
@ -395,6 +397,7 @@ void wlr_output_destroy(struct wlr_output *output) {
|
|||
output_clear_back_buffer(output);
|
||||
|
||||
wlr_signal_emit_safe(&output->events.destroy, output);
|
||||
wlr_addon_set_finish(&output->addons);
|
||||
|
||||
// The backend is responsible for free-ing the list of modes
|
||||
|
||||
|
|
Loading…
Reference in a new issue