output: add cursor output layers

This commit is contained in:
Simon Ser 2023-02-27 10:46:08 +01:00
parent 2bd5879950
commit a863b82bdb
2 changed files with 8 additions and 0 deletions

View file

@ -270,6 +270,10 @@ static bool test_layer(struct wlr_wl_output *output, struct wlr_output_layer_sta
return true;
}
if (layer_state->layer->cursor) {
return false; // TODO: add support for cursor layers
}
int x = layer_state->dst_box.x;
int y = layer_state->dst_box.y;
int width = layer_state->dst_box.width;

View file

@ -43,6 +43,7 @@
struct wlr_output_layer {
struct wl_list link; // wlr_output.layers
struct wlr_addon_set addons;
bool cursor;
struct {
struct wl_signal feedback; // struct wlr_output_layer_feedback_event
@ -71,6 +72,9 @@ struct wlr_output_layer_state {
// Damaged region since last commit in buffer-local coordinates. Leave NULL
// to damage the whole buffer.
const pixman_region32_t *damage;
struct {
int x, y;
} cursor_hotspot;
// Populated by the backend after wlr_output_test() and wlr_output_commit(),
// indicates whether the backend has acknowledged and will take care of