mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
a fix for the definable cursor code
This commit is contained in:
@@ -3460,13 +3460,13 @@ setMultiByte(WScreen *scr, WDefaultEntry *entry, char *value, void *foo)
|
|||||||
static int
|
static int
|
||||||
setCursor(WScreen *scr, WDefaultEntry *entry, Cursor *cursor, long index)
|
setCursor(WScreen *scr, WDefaultEntry *entry, Cursor *cursor, long index)
|
||||||
{
|
{
|
||||||
if (None != wCursor[index]) {
|
if (wCursor[index] != None) {
|
||||||
XFreeCursor(dpy, wCursor[index]);
|
XFreeCursor(dpy, wCursor[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
wCursor[index] = *cursor;
|
wCursor[index] = *cursor;
|
||||||
|
|
||||||
if ((WCUR_ROOT == index) && (None != *cursor)) {
|
if (index==WCUR_ROOT && *cursor!=None) {
|
||||||
XDefineCursor(dpy, scr->root_win, *cursor);
|
XDefineCursor(dpy, scr->root_win, *cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -699,7 +699,7 @@ wScreenInit(int screen_number)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
XDefineCursor(dpy, scr->root_win, wCursor[WCUR_DEFAULT]);
|
XDefineCursor(dpy, scr->root_win, wCursor[WCUR_ROOT]);
|
||||||
|
|
||||||
/* screen descriptor for raster graphic library */
|
/* screen descriptor for raster graphic library */
|
||||||
rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_StandardColormap;
|
rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_StandardColormap;
|
||||||
|
|||||||
@@ -805,8 +805,7 @@ StartUp(Bool defaultScreenOnly)
|
|||||||
|
|
||||||
|
|
||||||
/* cursors */
|
/* cursors */
|
||||||
wCursor[WCUR_NORMAL] = None;
|
wCursor[WCUR_NORMAL] = None; /* inherit from root */
|
||||||
/*wCursor[WCUR_NORMAL] = XCreateFontCursor(dpy, XC_left_ptr);*/
|
|
||||||
wCursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr);
|
wCursor[WCUR_ROOT] = XCreateFontCursor(dpy, XC_left_ptr);
|
||||||
wCursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow);
|
wCursor[WCUR_ARROW] = XCreateFontCursor(dpy, XC_top_left_arrow);
|
||||||
wCursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur);
|
wCursor[WCUR_MOVE] = XCreateFontCursor(dpy, XC_fleur);
|
||||||
|
|||||||
Reference in New Issue
Block a user