From 8b6d86f56593db6a1a67e0ce6ebeabcf50599ac4 Mon Sep 17 00:00:00 2001 From: Mikael SANS Date: Tue, 21 Feb 2012 17:32:20 +0000 Subject: [PATCH] Fix: wrong center point between fingers SVN revision: 68228 --- legacy/elementary/src/lib/elm_gesture_layer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/elementary/src/lib/elm_gesture_layer.c b/legacy/elementary/src/lib/elm_gesture_layer.c index 304459d8e8..dc76b5deb4 100644 --- a/legacy/elementary/src/lib/elm_gesture_layer.c +++ b/legacy/elementary/src/lib/elm_gesture_layer.c @@ -2374,7 +2374,7 @@ get_finger_gap_length(Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, #if defined(DEBUG_GESTURE_LAYER) printf("==== HORIZ ====\n"); #endif - *x = (Evas_Coord) (xx / 2); + *x = (Evas_Coord) ((x2 > x1) ? (x1 + (xx / 2)) : (x2 + (xx / 2))); *y = (Evas_Coord) (y1); } @@ -2384,7 +2384,7 @@ get_finger_gap_length(Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, printf("==== VERT ====\n"); #endif *x = (Evas_Coord) (x1); - *y = (Evas_Coord) (yy / 2); + *y = (Evas_Coord) ((y2 > y1) ? (y1 + (yy / 2)) : (y2 + (yy / 2))); } } /* END - Compute zoom center point */