From 520a6cd0e4a5432e9270b7cb90d9fdfec3ec49df Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 21 Dec 2001 11:00:45 +0000 Subject: [PATCH] a fix for the definable cursor code --- src/WindowMaker.h | 2 +- src/defaults.c | 4 ++-- src/screen.c | 2 +- src/startup.c | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 7f8ee029..71536bb1 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -128,7 +128,7 @@ typedef enum { #endif /* XKB_BUTTON_HINT */ /* cursors */ -#define WCUR_DEFAULT 0 +#define WCUR_DEFAULT 0 #define WCUR_NORMAL 0 #define WCUR_MOVE 1 #define WCUR_RESIZE 2 diff --git a/src/defaults.c b/src/defaults.c index eeace2ee..cf665343 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -3460,13 +3460,13 @@ setMultiByte(WScreen *scr, WDefaultEntry *entry, char *value, void *foo) static int setCursor(WScreen *scr, WDefaultEntry *entry, Cursor *cursor, long index) { - if (None != wCursor[index]) { + if (wCursor[index] != None) { XFreeCursor(dpy, wCursor[index]); } wCursor[index] = *cursor; - if ((WCUR_ROOT == index) && (None != *cursor)) { + if (index==WCUR_ROOT && *cursor!=None) { XDefineCursor(dpy, scr->root_win, *cursor); } diff --git a/src/screen.c b/src/screen.c index b79aad46..23a4f216 100644 --- a/src/screen.c +++ b/src/screen.c @@ -699,7 +699,7 @@ wScreenInit(int screen_number) return NULL; } - XDefineCursor(dpy, scr->root_win, wCursor[WCUR_DEFAULT]); + XDefineCursor(dpy, scr->root_win, wCursor[WCUR_ROOT]); /* screen descriptor for raster graphic library */ rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_StandardColormap; diff --git a/src/startup.c b/src/startup.c index 30a966d6..e7126f2d 100644 --- a/src/startup.c +++ b/src/startup.c @@ -805,8 +805,7 @@ StartUp(Bool defaultScreenOnly) /* cursors */ - wCursor[WCUR_NORMAL] = None; - /*wCursor[WCUR_NORMAL] = XCreateFontCursor(dpy, XC_left_ptr);*/ + wCursor[WCUR_NORMAL] = None; /* inherit from root */ wCursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr); wCursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow); wCursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur); -- 2.11.4.GIT