mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Allow to update the cursor hotspot without its pixels
This commit is contained in:
parent
5c6a933890
commit
92daa790bb
5 changed files with 34 additions and 11 deletions
|
|
@ -54,11 +54,18 @@ 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) {
|
||||
int32_t hotspot_x, int32_t hotspot_y, bool update_pixels) {
|
||||
struct wlr_wl_backend_output *output = (struct wlr_wl_backend_output *)_output;
|
||||
struct wlr_wl_backend *backend = output->backend;
|
||||
|
||||
if (!update_pixels) {
|
||||
// Update hotspot without changing cursor image
|
||||
wlr_wl_output_update_cursor(output, output->enter_serial, hotspot_x,
|
||||
hotspot_y);
|
||||
return true;
|
||||
}
|
||||
if (!buf) {
|
||||
// Hide cursor
|
||||
wl_pointer_set_cursor(output->backend->pointer, output->enter_serial,
|
||||
NULL, 0, 0);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue