aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-09 17:56:05 -0400
committerGitHub <noreply@github.com>2017-10-09 17:56:05 -0400
commitc39bfe7f84818be9d9901e30ba26db9e8f19c47e (patch)
tree39188d9396028b4c7f948fce6bf197db2a656bcf /backend
parent1c3c2ff90a2d33543c5015a3067e792d887d7ea4 (diff)
parentb1cba36aebb6629fc2019360197f34394abaf2ac (diff)
Merge pull request #206 from emersion/client-cursor
Client provided cursors
Diffstat (limited to 'backend')
-rw-r--r--backend/wayland/output.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index 062a91a1..03b43b35 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -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) {