diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2017-11-06 18:25:58 -0600 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2018-02-25 21:53:24 -0600 |
commit | 3bb900cd6c1c7a5364bd79bce63fdd8711bc878b (patch) | |
tree | 854f906a109a0de83576ee2d8183c1eb4477adf6 /x.c | |
parent | 323d38da20c8a1d295ab1dbc0fc7ce947ef824e1 (diff) | |
download | st-3bb900cd6c1c7a5364bd79bce63fdd8711bc878b.tar.gz st-3bb900cd6c1c7a5364bd79bce63fdd8711bc878b.tar.bz2 |
Remove Time argument from xsetsel
This is an X type and should be internal to x.c.
The selcopy() function was a single line and only used in one place, so
it was inlined to reduce LOC.
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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; |