1
0
mirror of git://git.suckless.org/st synced 2025-08-03 05:32:21 -07:00

4 Commits
0.1 ... 0.1.1

Author SHA1 Message Date
Aurélien Aptel
d343f5847b update VERSION. 2011-04-03 21:04:45 +02:00
Aurélien Aptel
55c8d82eb1 take BORDER into account for selection. (thx Petr Sabata) 2011-04-03 21:03:48 +02:00
Aurélien Aptel
d679267c46 fix utf8 clipboard. (thx Petr Sabata) 2011-04-03 21:00:55 +02:00
Aurélien Aptel
bdd3246271 Added tag 0.1 for changeset cbc18c988236 2011-04-03 02:02:31 +02:00
3 changed files with 7 additions and 6 deletions

1
.hgtags Normal file
View File

@@ -0,0 +1 @@
cbc18c988236c63a58ed24031805e8d36a3ad01a 0.1

View File

@@ -1,5 +1,5 @@
# st version
VERSION = 0.0
VERSION = 0.1.1
# Customize below to fit your system

10
st.c
View File

@@ -392,8 +392,8 @@ getbuttoninfo(XEvent *e, int *b, int *x, int *y) {
if(b)
*b = e->xbutton.button;
*x = e->xbutton.x/xw.cw;
*y = e->xbutton.y/xw.ch;
*x = (e->xbutton.x - BORDER)/xw.cw;
*y = (e->xbutton.y - BORDER)/xw.ch;
sel.b.x = sel.by < sel.ey ? sel.bx : sel.ex;
sel.b.y = MIN(sel.by, sel.ey);
sel.e.x = sel.by < sel.ey ? sel.ex : sel.bx;
@@ -403,8 +403,8 @@ getbuttoninfo(XEvent *e, int *b, int *x, int *y) {
void
bpress(XEvent *e) {
sel.mode = 1;
sel.ex = sel.bx = e->xbutton.x/xw.cw;
sel.ey = sel.by = e->xbutton.y/xw.ch;
sel.ex = sel.bx = (e->xbutton.x - BORDER)/xw.cw;
sel.ey = sel.by = (e->xbutton.y - BORDER)/xw.ch;
}
void
@@ -483,7 +483,7 @@ selrequest(XEvent *e) {
XA_ATOM, 32, PropModeReplace,
(unsigned char *) &string, 1);
xev.property = xsre->property;
} else if(xsre->target == XA_STRING) {
} else if(xsre->target == sel.xtarget) {
XChangeProperty(xsre->display, xsre->requestor, xsre->property,
xsre->target, 8, PropModeReplace,
(unsigned char *) sel.clip, strlen(sel.clip));