XCURSOR_SIZE is used on libXcursor to change the cursor size and toytoolkit
should read it as well for consistency with xwayland. If the env var is not
set, size 32 is hardcoded for both toytoolkit and xwayland.

Signed-off-by: Tiago Vignatti <[email protected]>
---
v2: make cursor size configurable now via env var on both xwayland and
toytoolkit. Previously I was hardcoding 32 for xwayland.

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

diff --git a/clients/window.c b/clients/window.c
index 9f41a9c..483f356 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -655,8 +655,16 @@ static void
 create_cursors(struct display *display)
 {
        unsigned int i;
+       char *v = NULL;
+       int size = 0;
 
-       display->cursor_theme = wl_cursor_theme_load(NULL, 32, display->shm);
+       v = getenv ("XCURSOR_SIZE");
+       if (v)
+               size = atoi(v);
+       if (!size)
+               size = 32;
+
+       display->cursor_theme = wl_cursor_theme_load(NULL, size, display->shm);
        display->cursors =
                malloc(ARRAY_LENGTH(cursors) * sizeof display->cursors[0]);
 
-- 
1.7.9.5

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to