Dbe is not required anymore.
This commit is contained in:
parent
3ce96aea8a
commit
0e232a4115
20
st.c
20
st.c
|
@ -203,7 +203,7 @@ typedef struct {
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
Colourmap cmap;
|
Colourmap cmap;
|
||||||
Window win;
|
Window win;
|
||||||
XdbeBackBuffer buf;
|
Drawable buf;
|
||||||
Atom xembed, wmdeletewin;
|
Atom xembed, wmdeletewin;
|
||||||
XIM xim;
|
XIM xim;
|
||||||
XIC xic;
|
XIC xic;
|
||||||
|
@ -414,6 +414,8 @@ static char *opt_embed = NULL;
|
||||||
static char *opt_class = NULL;
|
static char *opt_class = NULL;
|
||||||
static char *opt_font = NULL;
|
static char *opt_font = NULL;
|
||||||
|
|
||||||
|
bool usedbe = False;
|
||||||
|
|
||||||
static char *usedfont = NULL;
|
static char *usedfont = NULL;
|
||||||
static int usedfontsize = 0;
|
static int usedfontsize = 0;
|
||||||
|
|
||||||
|
@ -2500,7 +2502,8 @@ xinit(void) {
|
||||||
| ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
|
| ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
|
||||||
attrs.colormap = xw.cmap;
|
attrs.colormap = xw.cmap;
|
||||||
|
|
||||||
parent = opt_embed ? strtol(opt_embed, NULL, 0) : XRootWindow(xw.dpy, xw.scr);
|
parent = opt_embed ? strtol(opt_embed, NULL, 0) : \
|
||||||
|
XRootWindow(xw.dpy, xw.scr);
|
||||||
xw.win = XCreateWindow(xw.dpy, parent, xw.fx, xw.fy,
|
xw.win = XCreateWindow(xw.dpy, parent, xw.fx, xw.fy,
|
||||||
xw.w, xw.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput,
|
xw.w, xw.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput,
|
||||||
xw.vis,
|
xw.vis,
|
||||||
|
@ -2509,12 +2512,16 @@ xinit(void) {
|
||||||
&attrs);
|
&attrs);
|
||||||
|
|
||||||
/* double buffering */
|
/* double buffering */
|
||||||
if(!XdbeQueryExtension(xw.dpy, &major, &minor))
|
if(XdbeQueryExtension(xw.dpy, &major, &minor)) {
|
||||||
die("Xdbe extension is not present\n");
|
xw.buf = XdbeAllocateBackBufferName(xw.dpy, xw.win,
|
||||||
xw.buf = XdbeAllocateBackBufferName(xw.dpy, xw.win, XdbeBackground);
|
XdbeBackground);
|
||||||
|
usedbe = True;
|
||||||
|
} else {
|
||||||
|
xw.buf = xw.win;
|
||||||
|
}
|
||||||
|
|
||||||
/* Xft rendering context */
|
/* Xft rendering context */
|
||||||
xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap);
|
xw.draw = XftDrawCreate(xw.dpy, xw.win, xw.vis, xw.cmap);
|
||||||
|
|
||||||
/* input methods */
|
/* input methods */
|
||||||
if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) {
|
if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) {
|
||||||
|
@ -2822,6 +2829,7 @@ draw(void) {
|
||||||
XdbeSwapInfo swpinfo[1] = {{xw.win, XdbeCopied}};
|
XdbeSwapInfo swpinfo[1] = {{xw.win, XdbeCopied}};
|
||||||
|
|
||||||
drawregion(0, 0, term.col, term.row);
|
drawregion(0, 0, term.col, term.row);
|
||||||
|
if(usedbe)
|
||||||
XdbeSwapBuffers(xw.dpy, swpinfo, 1);
|
XdbeSwapBuffers(xw.dpy, swpinfo, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue