mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-21 20:35:58 +01:00
output-layer: add feedback event
This commit is contained in:
parent
4d6fbb2289
commit
e1335a792a
2 changed files with 18 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
#ifndef WLR_TYPES_WLR_OUTPUT_LAYER_H
|
#ifndef WLR_TYPES_WLR_OUTPUT_LAYER_H
|
||||||
#define WLR_TYPES_WLR_OUTPUT_LAYER_H
|
#define WLR_TYPES_WLR_OUTPUT_LAYER_H
|
||||||
|
|
||||||
|
#include <wlr/render/drm_format_set.h>
|
||||||
#include <wlr/types/wlr_output.h>
|
#include <wlr/types/wlr_output.h>
|
||||||
#include <wlr/util/addon.h>
|
#include <wlr/util/addon.h>
|
||||||
|
|
||||||
|
@ -36,6 +37,10 @@ struct wlr_output_layer {
|
||||||
struct wl_list link; // wlr_output.layers
|
struct wl_list link; // wlr_output.layers
|
||||||
struct wlr_addon_set addons;
|
struct wlr_addon_set addons;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
struct wl_signal feedback; // struct wlr_output_layer_feedback_event
|
||||||
|
} events;
|
||||||
|
|
||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,6 +61,18 @@ struct wlr_output_layer_state {
|
||||||
bool accepted;
|
bool accepted;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Feedback for an output layer.
|
||||||
|
*
|
||||||
|
* After an output commit, if the backend is not able to display a layer, it
|
||||||
|
* can send feedback events. These events can be used to re-allocate the
|
||||||
|
* layer's buffers so that they have a higher chance to get displayed.
|
||||||
|
*/
|
||||||
|
struct wlr_output_layer_feedback_event {
|
||||||
|
dev_t target_device;
|
||||||
|
const struct wlr_drm_format_set *formats;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new output layer.
|
* Create a new output layer.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,6 +9,7 @@ struct wlr_output_layer *wlr_output_layer_create(struct wlr_output *output) {
|
||||||
|
|
||||||
wl_list_insert(&output->layers, &layer->link);
|
wl_list_insert(&output->layers, &layer->link);
|
||||||
wlr_addon_set_init(&layer->addons);
|
wlr_addon_set_init(&layer->addons);
|
||||||
|
wl_signal_init(&layer->events.feedback);
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue