1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 23:22:30 +01:00

- made the definable cursors feature available by default (removed the

compile time option)
This commit is contained in:
dan
2001-11-23 05:39:13 +00:00
parent 0c4dc1c24a
commit 06b48596f5
7 changed files with 55 additions and 105 deletions

View File

@@ -176,11 +176,9 @@ static int setMultiByte();
#endif
static int updateUsableArea();
#ifdef DEFINABLE_CURSOR
extern Cursor wCursor[WCUR_LAST];
static int getCursor();
static int setCursor();
#endif
/*
@@ -803,7 +801,7 @@ WDefaultEntry optionList[] = {
&wPreferences.modelock, getBool, NULL
}
#endif /* KEEP_XKB_LOCK_STATUS */
#ifdef DEFINABLE_CURSOR
,{"NormalCursor", "(builtin, left_ptr)", (void*)WCUR_ROOT,
NULL, getCursor, setCursor
},
@@ -852,7 +850,6 @@ WDefaultEntry optionList[] = {
{"SelectCursor", "(builtin, cross)", (void*)WCUR_SELECT,
NULL, getCursor, setCursor
}
#endif /* DEFINABLE_CURSOR */
};
@@ -2472,8 +2469,6 @@ getRImages(WScreen *scr, WDefaultEntry *entry, WMPropList *value,
}
#endif
#ifdef DEFINABLE_CURSOR
# include <X11/cursorfont.h>
typedef struct
{
@@ -2736,8 +2731,6 @@ again:
}
#undef CURSOR_ID_NONE
#endif /* DEFINABLE_CURSOR */
/* ---------------- value setting functions --------------- */
static int
@@ -3435,28 +3428,26 @@ setMultiByte(WScreen *scr, WDefaultEntry *entry, char *value, void *foo)
extern _WINGsConfiguration WINGsConfiguration;
WINGsConfiguration.useMultiByte = *value;
return 0;
}
#endif
#ifdef DEFINABLE_CURSOR
static int
setCursor(WScreen *scr, WDefaultEntry *entry, Cursor *cursor, long index)
{
if (None != wCursor[index])
{
if (None != wCursor[index]) {
XFreeCursor(dpy, wCursor[index]);
}
}
wCursor[index] = *cursor;
if ((WCUR_ROOT == index) && (None != *cursor))
{
if ((WCUR_ROOT == index) && (None != *cursor)) {
XDefineCursor(dpy, scr->root_win, *cursor);
}
}
return 0;
}
#endif /* DEFINABLE_CURSOR*/

View File

@@ -697,9 +697,7 @@ wScreenInit(int screen_number)
return NULL;
}
#ifndef DEFINABLE_CURSOR
XDefineCursor(dpy, scr->root_win, wCursor[WCUR_DEFAULT]);
#endif
/* screen descriptor for raster graphic library */
rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_StandardColormap;

View File

@@ -805,11 +805,8 @@ StartUp(Bool defaultScreenOnly)
/* cursors */
#ifdef DEFINABLE_CURSOR
wCursor[WCUR_NORMAL] = None;
#else
wCursor[WCUR_NORMAL] = XCreateFontCursor(dpy, XC_left_ptr);
#endif
/*wCursor[WCUR_NORMAL] = None;*/
wCursor[WCUR_NORMAL] = XCreateFontCursor(dpy, XC_left_ptr);
wCursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr);
wCursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow);
wCursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur);

View File

@@ -213,12 +213,6 @@
*/
#undef GRADIENT_CLIP_ARROWS
/*
* define DEFINABLE_CURSOR if you want WindowMaker's default cursor
* to be user-definable instead of using a hard-coded left_ptr.
*/
#undef DEFINABLE_CURSOR
#undef NO_WINDOW_ENUMERATOR