all repos — st @ ba1e9daeef0d7e6e52a9889d8f7eb61d74480cf0

st (suckless terminal) config

Call XdbeQueryExtension before of calling any Xdbe function

XdbeQueryExtension() tells to the caller if the Xdbe extension is present in
the X server, so it should be called for sanity. But like is said in
XdbeQueryExtension(3):

	No other Xdbe functions may be called before this function.  If a
	client violates this rule, the effects of all subsequent Xdbe calls
	that it makes are undefined.

it is mandatory call this function.
---
 st.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
commit

ba1e9daeef0d7e6e52a9889d8f7eb61d74480cf0

parent

a62789788c87425fd90209bad15b324f8dee84da

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M st.cst.c

@@ -1970,7 +1970,7 @@ xinit(void) {

XSetWindowAttributes attrs; Cursor cursor; Window parent; - int sw, sh; + int sw, sh, major, minor; if(!(xw.dpy = XOpenDisplay(NULL))) die("Can't open display\n");

@@ -2021,8 +2021,9 @@ XDefaultVisual(xw.dpy, xw.scr),

CWBackPixel | CWBorderPixel | CWBitGravity | CWEventMask | CWColormap, &attrs); + if(!XdbeQueryExtension(xw.dpy, &major, &minor)) + die("Xdbe extension is not present\n"); xw.buf = XdbeAllocateBackBufferName(xw.dpy, xw.win, XdbeCopied); - /* input methods */ xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL);