Applies dynamic cursor colour patch
This commit is contained in:
parent
3421484e69
commit
54938a77e4
1 changed files with 11 additions and 2 deletions
13
x.c
13
x.c
|
@ -1510,6 +1510,7 @@ void
|
||||||
xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
|
xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
|
||||||
{
|
{
|
||||||
Color drawcol;
|
Color drawcol;
|
||||||
|
XRenderColor colbg;
|
||||||
|
|
||||||
/* remove the old cursor */
|
/* remove the old cursor */
|
||||||
if (selected(ox, oy))
|
if (selected(ox, oy))
|
||||||
|
@ -1539,10 +1540,18 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
|
||||||
g.fg = defaultfg;
|
g.fg = defaultfg;
|
||||||
g.bg = defaultrcs;
|
g.bg = defaultrcs;
|
||||||
} else {
|
} else {
|
||||||
|
g.bg = g.fg;
|
||||||
g.fg = defaultbg;
|
g.fg = defaultbg;
|
||||||
g.bg = defaultcs;
|
|
||||||
}
|
}
|
||||||
drawcol = dc.col[g.bg];
|
|
||||||
|
if (IS_TRUECOL(g.bg)){
|
||||||
|
colbg.alpha = 0xffff;
|
||||||
|
colbg.red = TRUERED(g.bg);
|
||||||
|
colbg.green = TRUEGREEN(g.bg);
|
||||||
|
colbg.blue = TRUEBLUE(g.bg);
|
||||||
|
XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &drawcol);
|
||||||
|
} else
|
||||||
|
drawcol = dc.col[g.bg];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draw the new one */
|
/* draw the new one */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue