[PATCH 1/3] toytoolkit: implement cursor-size config key

Emilio Pozuelo Monfort pochu27 at gmail.com
Thu Mar 14 09:23:37 PDT 2013


---
 clients/window.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/clients/window.c b/clients/window.c
index 249ba6f..ec3dca8 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1095,10 +1095,12 @@ create_cursors(struct display *display)
 {
 	char *config_file;
 	char *theme = NULL;
+	unsigned int size = 32;
 	unsigned int i, j;
 	struct wl_cursor *cursor;
 	struct config_key shell_keys[] = {
 		{ "cursor-theme", CONFIG_KEY_STRING, &theme },
+		{ "cursor-size", CONFIG_KEY_UNSIGNED_INTEGER, &size },
 	};
 	struct config_section cs[] = {
 		{ "shell", shell_keys, ARRAY_LENGTH(shell_keys), NULL },
@@ -1108,7 +1110,7 @@ create_cursors(struct display *display)
 	parse_config_file(config_file, cs, ARRAY_LENGTH(cs), NULL);
 	free(config_file);
 
-	display->cursor_theme = wl_cursor_theme_load(theme, 32, display->shm);
+	display->cursor_theme = wl_cursor_theme_load(theme, size, display->shm);
 	display->cursors =
 		malloc(ARRAY_LENGTH(cursors) * sizeof display->cursors[0]);
 
-- 
1.7.10.4



More information about the wayland-devel mailing list