1 Commits

Author SHA1 Message Date
6785ee8e34 Added bold-is-not-bright v2019-01-27 patch 2023-06-27 21:58:47 +02:00

23
x.c
View File

@ -689,8 +689,6 @@ setsel(char *str, Time t)
XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t);
if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win)
selclear(); selclear();
xclipcopy();
} }
void void
@ -714,9 +712,7 @@ brelease(XEvent *e)
if (mouseaction(e, 1)) if (mouseaction(e, 1))
return; return;
if (btn == Button3) if (btn == Button1)
selpaste(NULL);
else if (btn == Button1)
mousesel(e, 1); mousesel(e, 1);
} }
@ -1541,7 +1537,6 @@ 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))
@ -1570,21 +1565,11 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
if (selected(cx, cy)) { if (selected(cx, cy)) {
g.fg = defaultfg; g.fg = defaultfg;
g.bg = defaultrcs; g.bg = defaultrcs;
} else if (!(og.mode & ATTR_REVERSE)) {
unsigned long col = g.bg;
g.bg = g.fg;
g.fg = col;
}
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 { } else {
drawcol = dc.col[g.bg]; g.fg = defaultbg;
g.bg = defaultcs;
} }
drawcol = dc.col[g.bg];
} }
/* draw the new one */ /* draw the new one */