Hi,
was digging a bit into this because we've put oneka as a rare easter egg event into our distro ( 
c.f. https://github.com/fsfw-dresden/usb-live-linux/tree/main/features/config_desktop_cats ) and 
the cursor was not restored properly. Turns out the 132 in cursor 132 (aka 
"top_left_arrow") suggested by the oneko man page to be the default root cursor is not 
what works on modern DEs. There, we want 68 ("left_ptr") .. as in the xsetroot command 
Charles has given 9 years ago.

See https://tronche.com/gui/x/xlib/appendix/b/ for a complete visual list of X 
cursors...

The two attached patches should help, one documents the number 68 to be a more 
adequate choice for modern DEs, the other expands on Ricardo's 2013 patch and 
makes oneko restore left_ptr (68) by default.

Best Regards
Marcel
--- oneko.man.orig	2023-02-21 15:51:16.000000000 +0100
+++ oneko.man	2023-02-21 18:39:13.419114942 +0100
@@ -93,7 +93,8 @@
 .TP
 .BI \-cursor " cursornumber"
 Specify a cursos number to set when quitting. For example, 132 is the
-default root cursor.
+default root cursor, while 68 (left_ptr) should be more fit for modern
+desktop environments.
 .SS Resources
 Application name is "neko"(or "tora") and class name is "Oneko".
 .TP
--- oneko.c.orig	2023-02-21 15:51:16.000000000 +0100
+++ oneko.c	2023-02-23 00:47:15.096002556 +0100
@@ -10,7 +10,7 @@
 #include "patchlevel.h"
 
 #include <X11/cursorfont.h>
-int restoredCursor = 0; 
+int restoredCursor = DEFAULT_CURSOR; 
 
 /*
  *	グローバル変数
--- oneko.h.orig	2023-02-21 15:51:16.000000000 +0100
+++ oneko.h	2023-02-23 01:00:52.602587346 +0100
@@ -60,6 +60,8 @@
 #define	DEFAULT_FOREGROUND	"black"		/* フォアグラウンドカラー */
 #define	DEFAULT_BACKGROUND	"white"		/* バックグラウンドカラー */
 
+#define	DEFAULT_CURSOR		68		/* left_ptr */
+
 /*
  *	猫の状態定数
  */

Reply via email to