diff options
-rw-r--r-- | st.c | 2 | ||||
-rw-r--r-- | win.h | 2 | ||||
-rw-r--r-- | x.c | 18 |
3 files changed, 11 insertions, 11 deletions
@@ -1747,7 +1747,7 @@ strhandle(void) dec = base64dec(strescseq.args[2]); if (dec) { - xsetsel(dec, CurrentTime); + xsetsel(dec); xclipcopy(); } else { fprintf(stderr, "erresc: invalid base64\n"); @@ -16,4 +16,4 @@ int xsetcolorname(int, const char *); void xsettitle(char *); int xsetcursor(int); void xsetpointermotion(int); -void xsetsel(char *, Time); +void xsetsel(char *); @@ -148,7 +148,7 @@ static void propnotify(XEvent *); static void selnotify(XEvent *); static void selclear_(XEvent *); static void selrequest(XEvent *); -static void selcopy(Time); +static void setsel(char *, Time); static void getbuttoninfo(XEvent *); static void mousereport(XEvent *); static char *kmap(KeySym, uint); @@ -441,12 +441,6 @@ bpress(XEvent *e) } void -selcopy(Time t) -{ - xsetsel(getsel(), t); -} - -void propnotify(XEvent *e) { XPropertyEvent *xpev; @@ -620,7 +614,7 @@ selrequest(XEvent *e) } void -xsetsel(char *str, Time t) +setsel(char *str, Time t) { free(sel.primary); sel.primary = str; @@ -631,6 +625,12 @@ xsetsel(char *str, Time t) } void +xsetsel(char *str) +{ + setsel(str, CurrentTime); +} + +void brelease(XEvent *e) { if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { @@ -643,7 +643,7 @@ brelease(XEvent *e) } else if (e->xbutton.button == Button1) { if (sel.mode == SEL_READY) { getbuttoninfo(e); - selcopy(e->xbutton.time); + setsel(getsel(), e->xbutton.time); } else selclear_(NULL); sel.mode = SEL_IDLE; |