aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/capabilities.c4
-rw-r--r--src/capabilities.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/capabilities.c b/src/capabilities.c
index 065c810..1f555f9 100644
--- a/src/capabilities.c
+++ b/src/capabilities.c
@@ -26,6 +26,8 @@
#define ADDCAP(s, c, x) strcat(s, c->has_##x ? " " #x : "")
+#define CLICK_AREA(c) ((c->has_ibt ? 0.20 : 0.00) * get_cap_ysize(c))
+
static const int SN_COORD = 250; /* coordinate signal-to-noise ratio */
static const int bits_per_long = 8 * sizeof(long);
@@ -102,6 +104,8 @@ int read_capabilities(struct Capabilities *cap, int fd)
cap->yfuzz = get_cap_ysize(cap) / SN_COORD;
}
+ cap->yclick = cap->abs_position_y.maximum - CLICK_AREA(cap);
+
return 0;
}
diff --git a/src/capabilities.h b/src/capabilities.h
index 34c1767..af59384 100644
--- a/src/capabilities.h
+++ b/src/capabilities.h
@@ -41,6 +41,7 @@ struct Capabilities {
struct input_absinfo abs_position_x;
struct input_absinfo abs_position_y;
int xfuzz, yfuzz;
+ int yclick;
};
int read_capabilities(struct Capabilities *cap, int fd);