74 lines
2.5 KiB
Diff
74 lines
2.5 KiB
Diff
diff --git a/oneko.c b/oneko.c
|
||
index d2b81fe..8c0d965 100644
|
||
--- a/oneko.c
|
||
+++ b/oneko.c
|
||
@@ -8,6 +8,10 @@ static char rcsid[] = "$Header: /home/sun/unix/kato/xsam/oneko/oneko.c,v 1.5 90/
|
||
|
||
#include "oneko.h"
|
||
#include "patchlevel.h"
|
||
+
|
||
+#include <X11/cursorfont.h>
|
||
+int restoredCursor = 0;
|
||
+
|
||
/*
|
||
* $@%0%m!<%P%kJQ?t(J
|
||
*/
|
||
@@ -716,7 +720,14 @@ RestoreCursor()
|
||
XSetWindowAttributes theWindowAttributes;
|
||
BitmapGCData *BitmapGCDataTablePtr;
|
||
|
||
- theWindowAttributes.cursor = None;
|
||
+ Cursor font_cursor;
|
||
+ if(restoredCursor >= XC_X_cursor && restoredCursor < XC_X_cursor + XC_num_glyphs)
|
||
+ font_cursor=XCreateFontCursor(theDisplay, restoredCursor );
|
||
+ if(font_cursor)
|
||
+ theWindowAttributes.cursor = font_cursor;
|
||
+ else
|
||
+ theWindowAttributes.cursor = None;
|
||
+
|
||
XChangeWindowAttributes(theDisplay, theRoot, CWCursor,
|
||
&theWindowAttributes);
|
||
for (BitmapGCDataTablePtr = BitmapGCDataTable;
|
||
@@ -1376,6 +1387,7 @@ char *message[] = {
|
||
"-tofocus : Neko runs on top of focus window",
|
||
"-rv : Reverse video. (effects monochrome display only)",
|
||
"-position <geometry> : adjust position relative to mouse pointer.",
|
||
+"-cursor <cursornumber> : cursor number to set when quitting.",
|
||
"-debug : puts you in synchronous mode.",
|
||
"-patchlevel : print out your current patchlevel.",
|
||
NULL };
|
||
@@ -1504,6 +1516,10 @@ GetArguments(argc, argv, theDisplayName)
|
||
ArgCounter++;
|
||
result=XParseGeometry(argv[ArgCounter],&XOffset,&YOffset,&foo,&bar);
|
||
}
|
||
+ else if (strcmp(argv[ArgCounter], "-cursor") == 0) {
|
||
+ ArgCounter++;
|
||
+ restoredCursor=atoi(argv[ArgCounter]);
|
||
+ }
|
||
else if (strcmp(argv[ArgCounter], "-debug") ==0) {
|
||
Synchronous = True;
|
||
}
|
||
diff --git a/oneko.man b/oneko.man
|
||
index d6d2b40..333388a 100644
|
||
--- a/oneko.man
|
||
+++ b/oneko.man
|
||
@@ -9,7 +9,7 @@ The program oneko creates a cute cat chasing around your mouse cursor.
|
||
[\fB-time\fP \fIn\fP] [\fB-speed\fP \fIn\fP] [\fB-idle\fP \fIn\fP]
|
||
[\fB-name\fP \fIname\fP] [\fB-towindow\fP] [\fB-toname\fP \fIname\fP]
|
||
[\fB-tofocus\fP]
|
||
-[\fB-position\fP \fIgeometry\fP]
|
||
+[\fB-position\fP \fIgeometry\fP] [\fB-cursor\fP]
|
||
[\fB-rv\fP] [\fB-noshape\fP] [\fB-fg\fP] [\fB-bg\fP]
|
||
.SH DESCRIPTION
|
||
.I oneko
|
||
@@ -88,6 +88,9 @@ When focus window is not in sight, cat chases mouse as usually.
|
||
Specify X and Y offsets in pixels to adjust position of cat relative
|
||
to mouse pointer.
|
||
.TP
|
||
+.BI \-cursor " cursornumber"
|
||
+Specify a cursor number to set when quitting. For example, 132 is the
|
||
+default root cursor.
|
||
.B -rv
|
||
Reverse background color and foreground color.
|
||
.TP
|