1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

a fix for the definable cursor code

This commit is contained in:
dan
2001-12-21 11:00:45 +00:00
parent f968d88070
commit 520a6cd0e4
4 changed files with 5 additions and 6 deletions

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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);