X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=st.c;h=f4ad23d21497d7d3e2ccadef170af3d9e8141aaa;hb=15cc8754c2e272ebac6e86845859816e881da000;hp=2e1ac670b04498445534194f9f38a7cb5f3c55bb;hpb=a62789788c87425fd90209bad15b324f8dee84da;p=st.git diff --git a/st.c b/st.c index 2e1ac67..f4ad23d 100644 --- a/st.c +++ b/st.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,9 +2021,10 @@ xinit(void) { 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); xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing @@ -2149,6 +2150,7 @@ redraw(void) { struct timespec tv = {0, REDRAW_TIMEOUT * 1000}; tfulldirt(); draw(); + XSync(xw.dpy, False); /* necessary for a good tput flash */ nanosleep(&tv, NULL); }