aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/wlr/types/wlr_cursor.h5
-rw-r--r--types/wlr_cursor.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index f3c7e970..a4c2e731 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -148,6 +148,11 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
int32_t hotspot_y, float scale);
/**
+ * Hide the cursor image.
+ */
+void wlr_cursor_unset_image(struct wlr_cursor *cur);
+
+/**
* Set the cursor image from an XCursor theme.
*
* The image will be loaded from the struct wlr_xcursor_manager.
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index cce37e81..8b568e38 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -425,6 +425,10 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
}
}
+void wlr_cursor_unset_image(struct wlr_cursor *cur) {
+ wlr_cursor_set_image(cur, NULL, 0, 0, 0, 0, 0, 0);
+}
+
void wlr_cursor_set_xcursor(struct wlr_cursor *cur,
struct wlr_xcursor_manager *manager, const char *name) {
struct wlr_cursor_output_cursor *output_cursor;