mirror of
https://github.com/mintycube/st.git
synced 2024-10-22 14:05:49 +02:00
21 lines
374 B
C
21 lines
374 B
C
|
static int invertcolors = 0;
|
||
|
|
||
|
void
|
||
|
invert(const Arg *dummy)
|
||
|
{
|
||
|
invertcolors = !invertcolors;
|
||
|
redraw();
|
||
|
}
|
||
|
|
||
|
Color
|
||
|
invertedcolor(Color *clr)
|
||
|
{
|
||
|
XRenderColor rc;
|
||
|
Color inverted;
|
||
|
rc.red = ~clr->color.red;
|
||
|
rc.green = ~clr->color.green;
|
||
|
rc.blue = ~clr->color.blue;
|
||
|
rc.alpha = clr->color.alpha;
|
||
|
XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &rc, &inverted);
|
||
|
return inverted;
|
||
|
}
|