From b6dea80907b840ed30f056b618ee20492870f664 Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Thu, 4 Feb 2021 08:56:09 -0500 Subject: [PATCH] xcursor: make cursor data and metadata const --- include/xcursor/cursor_data.h | 4 ++-- xcursor/wlr_xcursor.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xcursor/cursor_data.h b/include/xcursor/cursor_data.h index dd7a80af..ddd54d46 100644 --- a/include/xcursor/cursor_data.h +++ b/include/xcursor/cursor_data.h @@ -27,7 +27,7 @@ #include -static uint32_t cursor_data[] = { +static const uint32_t cursor_data[] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xff000000, @@ -532,7 +532,7 @@ static uint32_t cursor_data[] = { 0x00000000, 0x00000000, }; -static struct cursor_metadata { +static const struct cursor_metadata { char *name; int width, height; int hotspot_x, hotspot_y; diff --git a/xcursor/wlr_xcursor.c b/xcursor/wlr_xcursor.c index 85e76a55..a11d77a0 100644 --- a/xcursor/wlr_xcursor.c +++ b/xcursor/wlr_xcursor.c @@ -46,7 +46,7 @@ static void xcursor_destroy(struct wlr_xcursor *cursor) { #include "xcursor/cursor_data.h" static struct wlr_xcursor *xcursor_create_from_data( - struct cursor_metadata *metadata, struct wlr_xcursor_theme *theme) { + const struct cursor_metadata *metadata, struct wlr_xcursor_theme *theme) { struct wlr_xcursor *cursor; struct wlr_xcursor_image *image; int size;