mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Add wlr_output_set_cursor_surface
This commit is contained in:
parent
65d57920e5
commit
9b83caa658
4 changed files with 50 additions and 12 deletions
|
|
@ -55,9 +55,15 @@ static void wlr_wl_output_transform(struct wlr_output *_output,
|
|||
static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
|
||||
const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height,
|
||||
int32_t hotspot_x, int32_t hotspot_y) {
|
||||
|
||||
struct wlr_wl_backend_output *output = (struct wlr_wl_backend_output *)_output;
|
||||
struct wlr_wl_backend *backend = output->backend;
|
||||
|
||||
if (!buf) {
|
||||
wl_pointer_set_cursor(output->backend->pointer, output->enter_serial,
|
||||
NULL, 0, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
stride *= 4; // stride is given in pixels, we need it in bytes
|
||||
|
||||
if (!backend->shm || !backend->pointer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue