X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=96e66fb23f669fe1c7fe505a31de623ba9e6a140;hb=deb720af7fe480b03c881818e79164817ce6f85f;hp=6749dbdb032186d9b796d68b95d1d9de17edeeb7;hpb=3036051fb18addd8ac15eac9e0ef3ee6aeb8bbc6;p=st.git diff --git a/st.c b/st.c index 6749dbd..96e66fb 100644 --- a/st.c +++ b/st.c @@ -793,6 +793,7 @@ void selclear(XEvent *e) { void selrequest(XEvent *e) { + fprintf(stderr, "selrequest\n"); XSelectionRequestEvent *xsre; XSelectionEvent xev; Atom xa_targets, string; @@ -828,6 +829,7 @@ selrequest(XEvent *e) { void xsetsel(char *str) { + fprintf(stderr, "xsetsel: %s\n", str); /* register the selection for both the clipboard and the primary */ Atom clipboard; @@ -2479,6 +2481,7 @@ xzoom(const Arg *arg) void xinit(void) { XSetWindowAttributes attrs; + XGCValues gcvalues; Cursor cursor; Window parent; int sw, sh, major, minor; @@ -2544,7 +2547,10 @@ xinit(void) { usedbe = True; } else { */ - dc.gc = XCreateGC(xw.dpy, parent, 0, 0); + memset(&gcvalues, 0, sizeof(gcvalues)); + gcvalues.graphics_exposures = False; + dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, + &gcvalues); xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h, DefaultDepth(xw.dpy, xw.scr)); XSetForeground(xw.dpy, dc.gc, 0); @@ -2872,7 +2878,6 @@ draw(void) { XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, xw.w, xw.h, 0, 0); XSetForeground(xw.dpy, dc.gc, 0); - XSync(xw.dpy, False); } }