Merge remote-tracking branch 'upstream/master'

This commit is contained in:
mintycube 2024-08-11 12:48:43 +05:00
commit 9b7c9fe907
2 changed files with 8 additions and 5 deletions

2
st.c
View File

@ -2748,7 +2748,7 @@ strhandle(void)
} else { } else {
term.images = newimages; term.images = newimages;
} }
#if COLUMNS_PATCH && !REFLOW #if COLUMNS_PATCH && !REFLOW_PATCH
x2 = MIN(x2, term.maxcol) - 1; x2 = MIN(x2, term.maxcol) - 1;
#else #else
x2 = MIN(x2, term.col) - 1; x2 = MIN(x2, term.col) - 1;

11
x.c
View File

@ -1426,7 +1426,7 @@ xinit(int cols, int rows)
#elif !SWAPMOUSE_PATCH #elif !SWAPMOUSE_PATCH
Cursor cursor; Cursor cursor;
#endif // HIDECURSOR_PATCH #endif // HIDECURSOR_PATCH
Window parent; Window parent, root;
pid_t thispid = getpid(); pid_t thispid = getpid();
#if !SWAPMOUSE_PATCH #if !SWAPMOUSE_PATCH
XColor xmousefg, xmousebg; XColor xmousefg, xmousebg;
@ -1524,11 +1524,12 @@ xinit(int cols, int rows)
xw.attrs.event_mask |= PointerMotionMask; xw.attrs.event_mask |= PointerMotionMask;
#endif // OPENURLONCLICK_PATCH #endif // OPENURLONCLICK_PATCH
root = XRootWindow(xw.dpy, xw.scr);
#if !ALPHA_PATCH #if !ALPHA_PATCH
if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0))))
parent = XRootWindow(xw.dpy, xw.scr); parent = root;
#endif // ALPHA_PATCH #endif // ALPHA_PATCH
xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t, xw.win = XCreateWindow(xw.dpy, root, xw.l, xw.t,
#if ALPHA_PATCH #if ALPHA_PATCH
win.w, win.h, 0, xw.depth, InputOutput, win.w, win.h, 0, xw.depth, InputOutput,
#else #else
@ -1536,6 +1537,8 @@ xinit(int cols, int rows)
#endif // ALPHA_PATCH #endif // ALPHA_PATCH
xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity
| CWEventMask | CWColormap, &xw.attrs); | CWEventMask | CWColormap, &xw.attrs);
if (parent != root)
XReparentWindow(xw.dpy, xw.win, parent, xw.l, xw.t);
memset(&gcvalues, 0, sizeof(gcvalues)); memset(&gcvalues, 0, sizeof(gcvalues));
gcvalues.graphics_exposures = False; gcvalues.graphics_exposures = False;
@ -1548,7 +1551,7 @@ xinit(int cols, int rows)
#endif // SINGLE_DRAWABLE_BUFFER_PATCH #endif // SINGLE_DRAWABLE_BUFFER_PATCH
dc.gc = XCreateGC(xw.dpy, xw.buf, GCGraphicsExposures, &gcvalues); dc.gc = XCreateGC(xw.dpy, xw.buf, GCGraphicsExposures, &gcvalues);
#else #else
dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, dc.gc = XCreateGC(xw.dpy, xw.win, GCGraphicsExposures,
&gcvalues); &gcvalues);
#if SINGLE_DRAWABLE_BUFFER_PATCH #if SINGLE_DRAWABLE_BUFFER_PATCH
xw.buf = xw.win; xw.buf = xw.win;