From 14f65b1a3ddee4e70dc4c67234c3fccdd647af96 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 18 Mar 2010 21:14:48 +0100 Subject: Introduce convenience function for device dimensions The capability names are rather lengthy; this patch adds convenience functions for the dimension capabilities. Signed-off-by: Henrik Rydberg --- src/multitouch.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/multitouch.c') diff --git a/src/multitouch.c b/src/multitouch.c index 2919b9d..fd2393f 100644 --- a/src/multitouch.c +++ b/src/multitouch.c @@ -185,12 +185,8 @@ static void handle_gestures(LocalDevicePtr local, const struct Capabilities *caps) { static int vscroll, hscroll; - int vstep = 1 + - vscroll_fraction * (caps->abs_position_y.maximum - - caps->abs_position_y.minimum); - int hstep = 1 + - hscroll_fraction * (caps->abs_position_x.maximum - - caps->abs_position_x.minimum); + int vstep = 1 + vscroll_fraction * get_cap_ysize(caps); + int hstep = 1 + hscroll_fraction * get_cap_xsize(caps); int i; for (i = 0; i < DIM_BUTTON; i++) { if (GETBIT(gs->btmask, i)) { -- cgit v1.2.3