Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
|
a0274bc20e | ||
|
5dbcca4926 |
2 changed files with 11 additions and 5 deletions
5
st.c
5
st.c
|
@ -1132,6 +1132,7 @@ csiparse(void)
|
|||
{
|
||||
char *p = csiescseq.buf, *np;
|
||||
long int v;
|
||||
int sep = ';'; /* colon or semi-colon, but not both */
|
||||
|
||||
csiescseq.narg = 0;
|
||||
if (*p == '?') {
|
||||
|
@ -1149,7 +1150,9 @@ csiparse(void)
|
|||
v = -1;
|
||||
csiescseq.arg[csiescseq.narg++] = v;
|
||||
p = np;
|
||||
if (*p != ';' || csiescseq.narg == ESC_ARG_SIZ)
|
||||
if (sep == ';' && *p == ':')
|
||||
sep = ':'; /* allow override to colon once */
|
||||
if (*p != sep || csiescseq.narg == ESC_ARG_SIZ)
|
||||
break;
|
||||
p++;
|
||||
}
|
||||
|
|
11
x.c
11
x.c
|
@ -1131,7 +1131,7 @@ xinit(int cols, int rows)
|
|||
{
|
||||
XGCValues gcvalues;
|
||||
Cursor cursor;
|
||||
Window parent;
|
||||
Window parent, root;
|
||||
pid_t thispid = getpid();
|
||||
XColor xmousefg, xmousebg;
|
||||
|
||||
|
@ -1168,16 +1168,19 @@ xinit(int cols, int rows)
|
|||
| ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
|
||||
xw.attrs.colormap = xw.cmap;
|
||||
|
||||
root = XRootWindow(xw.dpy, xw.scr);
|
||||
if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0))))
|
||||
parent = XRootWindow(xw.dpy, xw.scr);
|
||||
xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t,
|
||||
parent = root;
|
||||
xw.win = XCreateWindow(xw.dpy, root, xw.l, xw.t,
|
||||
win.w, win.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput,
|
||||
xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity
|
||||
| CWEventMask | CWColormap, &xw.attrs);
|
||||
if (parent != root)
|
||||
XReparentWindow(xw.dpy, xw.win, parent, xw.l, xw.t);
|
||||
|
||||
memset(&gcvalues, 0, sizeof(gcvalues));
|
||||
gcvalues.graphics_exposures = False;
|
||||
dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures,
|
||||
dc.gc = XCreateGC(xw.dpy, xw.win, GCGraphicsExposures,
|
||||
&gcvalues);
|
||||
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
|
||||
DefaultDepth(xw.dpy, xw.scr));
|
||||
|
|
Loading…
Reference in a new issue