summaryrefslogtreecommitdiff
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2018-01-29 16:16:23 -0500
committerGitHub <[email protected]>2018-01-29 16:16:23 -0500
commit38903e580166b1fd4b55daa0c8b60d40f805f31c (patch)
treed74612bada10c8300d8c7f9ccdc16e57280cb03b /sway/input/cursor.c
parent0c58673c6a108ba241419a0f1d5fecd47f22370e (diff)
parent6259831d3168898a3f1560fb832106d194b582b4 (diff)
Merge pull request #1555 from martinetd/cmd_reload
commands: add 'reload' command
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index e6a4eca8..73a8ec5c 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -149,6 +149,16 @@ static void handle_request_set_cursor(struct wl_listener *listener,
wlr_log(L_DEBUG, "TODO: handle request set cursor event: %p", event);
}
+void sway_cursor_destroy(struct sway_cursor *cursor) {
+ if (!cursor) {
+ return;
+ }
+
+ wlr_xcursor_manager_destroy(cursor->xcursor_manager);
+ wlr_cursor_destroy(cursor->cursor);
+ free(cursor);
+}
+
struct sway_cursor *sway_cursor_create(struct sway_seat *seat) {
struct sway_cursor *cursor = calloc(1, sizeof(struct sway_cursor));
if (!sway_assert(cursor, "could not allocate sway cursor")) {