aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurélien Aptel2010-10-13 00:50:18 +0200
committerAurélien Aptel2010-10-13 00:50:18 +0200
commita6a7cee7a13aea758c1888abf2fe4aba2c4940a5 (patch)
tree8b1e09bcf495408609f9d424f95f24efdfe1e1bd
parent435e50ed91de0587c04bfd651979fdaa41dd14f2 (diff)
downloadaur-a6a7cee7a13aea758c1888abf2fe4aba2c4940a5.tar.gz
clean button selection code.
-rw-r--r--st.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/st.c b/st.c
index d1b90efe11b5..5d5ac301b4b7 100644
--- a/st.c
+++ b/st.c
@@ -243,8 +243,9 @@ static inline int selected(int x, int y) {
}
static void getbuttoninfo(XEvent *e, int *b, int *x, int *y) {
- if(b) *b = e->xbutton.state,
- *b=*b==4096?5:*b==2048?4:*b==1024?3:*b==512?2:*b==256?1:-1;
+ if(b)
+ *b = e->xbutton.button;
+
*x = e->xbutton.x/xw.cw;
*y = e->xbutton.y/xw.ch;
sel.b.x = sel.by < sel.ey ? sel.bx : sel.ex;