diff -Nru utouch-geis-2.2.9/debian/changelog utouch-geis-2.2.9/debian/changelog --- utouch-geis-2.2.9/debian/changelog 2012-04-25 15:09:10.000000000 -0400 +++ utouch-geis-2.2.9/debian/changelog 2012-04-27 13:01:59.000000000 -0400 @@ -1,3 +1,15 @@ +utouch-geis (2.2.9-0ubuntu3) UNRELEASED; urgency=low + + [ Chase Douglas ] + * fixed calculation of touch deltas (lp: #985916) + * calculated pinch radius delta as ratio (lp: #986215) + * fixed a C++ compile fail due to enum types (lp: #813819) + + [ Stephen M. Webb ] + * added device axis attributes (regression) (lp: #987539) + + -- Stephen M. Webb Fri, 27 Apr 2012 13:01:30 -0400 + utouch-geis (2.2.9-0ubuntu2) precise-proposed; urgency=low * fixed GeisTouches coordinates for direct devices (lp: #984069) diff -Nru utouch-geis-2.2.9/debian/patches/lp813819-typedef-geis-subscription-flags.patch utouch-geis-2.2.9/debian/patches/lp813819-typedef-geis-subscription-flags.patch --- utouch-geis-2.2.9/debian/patches/lp813819-typedef-geis-subscription-flags.patch 1969-12-31 19:00:00.000000000 -0500 +++ utouch-geis-2.2.9/debian/patches/lp813819-typedef-geis-subscription-flags.patch 2012-04-26 14:33:01.000000000 -0400 @@ -0,0 +1,28 @@ +Description: Typedef GeisSubscriptionFlags to an int instead of an enum. + . + When attempting to set a flags variable with multiple flags OR'd + together, the result is no longer equivalent to a specific value of the + enum. This causes build errors on variable assignment when building with + g++. +Author: Chase Douglas +Bug-Ubuntu: https://launchpad.net/bugs/813819 + +=== modified file 'include/geis/geis.h' +--- a/include/geis/geis.h ++++ b/include/geis/geis.h +@@ -1768,12 +1768,13 @@ + * If this flag is not set, a new gesture will be identified for each change in + * gesture class. + */ +-typedef enum GeisSubscriptionFlags ++enum + { + GEIS_SUBSCRIPTION_NONE = 0x0000, + GEIS_SUBSCRIPTION_GRAB = 0x0001, + GEIS_SUBSCRIPTION_CONT = 0x0002 +-} GeisSubscriptionFlags; ++}; ++typedef int GeisSubscriptionFlags; + + /** + * Creates a new subscription. diff -Nru utouch-geis-2.2.9/debian/patches/lp985986-fix-touch-delta-calculation.patch utouch-geis-2.2.9/debian/patches/lp985986-fix-touch-delta-calculation.patch --- utouch-geis-2.2.9/debian/patches/lp985986-fix-touch-delta-calculation.patch 1969-12-31 19:00:00.000000000 -0500 +++ utouch-geis-2.2.9/debian/patches/lp985986-fix-touch-delta-calculation.patch 2012-04-26 14:25:51.000000000 -0400 @@ -0,0 +1,116 @@ +Description: Save position in slice state and calculate deltas based on it + . + When synchronous events are not enabled, multiple grail events may have + been dropped in between geis events. Before this change, the geis deltas + were based on the grail deltas, which only accounted for the changes + between the previous and the current grail slice instead of from the + previous and current geis event. + . + This change started off as a reversion of commit 226.1.3, which + introduced the regression. The initial slice state was corrected to + represent the initial position. The number of touches was saved in the + slice state. Then, if the number of touches changes we reset the slice + state. This ensures we still have lp:967267 fixed. +Author: Chase Douglas +Bug-Ubuntu: https://launchpad.net/bugs/985916 + +=== modified file 'libutouch-geis/backend/grail/geis_grail_backend.c' +--- a/libutouch-geis/backend/grail/geis_grail_backend.c ++++ b/libutouch-geis/backend/grail/geis_grail_backend.c +@@ -65,7 +65,10 @@ + unsigned int slice_id; + uint64_t timestamp; + GeisFloat angle; ++ GeisFloat position_x; ++ GeisFloat position_y; + GeisFloat radius; ++ unsigned int num_touches; + }; + + +@@ -173,7 +176,6 @@ + GeisFrame frame) + { + UGGestureTypeMask ugmask = grail_slice_get_recognized(slice); +- const UGTransform *T = grail_slice_get_transform(slice); + const UGTransform *C = grail_slice_get_cumulative_transform(slice); + + geis_frame_add_attr(frame, geis_attr_new(GEIS_GESTURE_ATTRIBUTE_GESTURE_NAME, +@@ -195,14 +197,18 @@ + GEIS_ATTR_TYPE_FLOAT, + &position_y)); + +- GeisFloat delta_x = (*T)[0][2]; ++ GeisFloat delta_x = position_x - slice_state->position_x; + geis_frame_add_attr(frame, geis_attr_new(GEIS_GESTURE_ATTRIBUTE_DELTA_X, + GEIS_ATTR_TYPE_FLOAT, + &delta_x)); +- GeisFloat delta_y = (*T)[1][2]; ++ slice_state->position_x = position_x; ++ ++ GeisFloat delta_y = position_y - slice_state->position_y; + geis_frame_add_attr(frame, geis_attr_new(GEIS_GESTURE_ATTRIBUTE_DELTA_Y, + GEIS_ATTR_TYPE_FLOAT, + &delta_y)); ++ slice_state->position_y = position_y; ++ + if (delta_t > 0.0f) + { + GeisFloat x_velocity = delta_x / delta_t; +@@ -323,16 +329,46 @@ + _grail_be_slice_state_new(GeisGrailBackend gbe, + UGSlice slice) + { ++ const UGTransform *C = grail_slice_get_cumulative_transform(slice); + struct _GeisSliceState new_slice_state = { + .slice_id = grail_slice_get_id(slice), + .timestamp = 0, + .angle = 0.0f, +- .radius = 0.0f ++ .position_x = grail_slice_get_original_center_x(slice) + (*C)[0][2], ++ .position_y = grail_slice_get_original_center_y(slice) + (*C)[1][2], ++ .radius = 0.0f, ++ .num_touches = grail_slice_get_num_touches(slice) + }; + geis_bag_append(gbe->slice_states, &new_slice_state); + return _grail_be_slice_state_from_ugslice(gbe, slice); + } + ++/** ++ * Update a slice state for a grail slice. ++ * ++ * @param[in] slice_state the geis slice state ++ * @param[in] slice a grail slice ++ * ++ * This function resets the slice state if the number of touches has changed. ++ */ ++static void ++_grail_be_slice_state_update(struct _GeisSliceState *slice_state, UGSlice slice) ++{ ++ ++ if (slice_state->num_touches != grail_slice_get_num_touches(slice)) ++ { ++ const UGTransform *C = grail_slice_get_cumulative_transform(slice); ++ ++ slice_state->angle = 0.0f; ++ slice_state->position_x = grail_slice_get_original_center_x(slice) + ++ (*C)[0][2]; ++ slice_state->position_x = grail_slice_get_original_center_x(slice) + ++ (*C)[1][2]; ++ slice_state->radius = 0.0f; ++ slice_state->num_touches = grail_slice_get_num_touches(slice); ++ } ++} ++ + + /** + * Creates a geis event from a grail slice. +@@ -471,6 +507,8 @@ + slice_state->timestamp = timestamp; + } + ++ _grail_be_slice_state_update(slice_state, slice); ++ + GeisGroupSet groupset = geis_groupset_new(); + GeisAttr group_attr = geis_attr_new(GEIS_EVENT_ATTRIBUTE_GROUPSET, + GEIS_ATTR_TYPE_POINTER, diff -Nru utouch-geis-2.2.9/debian/patches/lp986215-calculate-pinch-delta-as-ratio.patch utouch-geis-2.2.9/debian/patches/lp986215-calculate-pinch-delta-as-ratio.patch --- utouch-geis-2.2.9/debian/patches/lp986215-calculate-pinch-delta-as-ratio.patch 1969-12-31 19:00:00.000000000 -0500 +++ utouch-geis-2.2.9/debian/patches/lp986215-calculate-pinch-delta-as-ratio.patch 2012-04-26 14:27:02.000000000 -0400 @@ -0,0 +1,34 @@ +Description: calculate pinch radius delta as ratio +Author: Chase Douglas +Bug-Ubuntu: https://launchpad.net/bugs/986215 + +=== modified file 'libutouch-geis/backend/grail/geis_grail_backend.c' +--- a/libutouch-geis/backend/grail/geis_grail_backend.c ++++ b/libutouch-geis/backend/grail/geis_grail_backend.c +@@ -233,7 +233,7 @@ + GEIS_ATTR_TYPE_FLOAT, + &r)); + +- GeisFloat dr = r - slice_state->radius; ++ GeisFloat dr = r / slice_state->radius; + geis_frame_add_attr(frame, geis_attr_new(GEIS_GESTURE_ATTRIBUTE_RADIUS_DELTA, + GEIS_ATTR_TYPE_FLOAT, + &dr)); +@@ -336,7 +336,7 @@ + .angle = 0.0f, + .position_x = grail_slice_get_original_center_x(slice) + (*C)[0][2], + .position_y = grail_slice_get_original_center_y(slice) + (*C)[1][2], +- .radius = 0.0f, ++ .radius = 1.0f, + .num_touches = grail_slice_get_num_touches(slice) + }; + geis_bag_append(gbe->slice_states, &new_slice_state); +@@ -364,7 +364,7 @@ + (*C)[0][2]; + slice_state->position_x = grail_slice_get_original_center_x(slice) + + (*C)[1][2]; +- slice_state->radius = 0.0f; ++ slice_state->radius = 1.0f; + slice_state->num_touches = grail_slice_get_num_touches(slice); + } + } diff -Nru utouch-geis-2.2.9/debian/patches/lp987539-add-device-axis-attributes.patch utouch-geis-2.2.9/debian/patches/lp987539-add-device-axis-attributes.patch --- utouch-geis-2.2.9/debian/patches/lp987539-add-device-axis-attributes.patch 1969-12-31 19:00:00.000000000 -0500 +++ utouch-geis-2.2.9/debian/patches/lp987539-add-device-axis-attributes.patch 2012-04-27 13:01:17.000000000 -0400 @@ -0,0 +1,86 @@ +Description: Add device axis attributes ro grail back end + . + This is a regression from the XCB back end. +Author: Stephen M. Webb +Bug-Ubuntu: https://bugs.launchpad.net/utouch-geis/+bug/987539 + +=== modified file 'libutouch-geis/backend/grail/geis_grail_backend.c' +--- a/libutouch-geis/backend/grail/geis_grail_backend.c ++++ b/libutouch-geis/backend/grail/geis_grail_backend.c +@@ -751,6 +751,67 @@ + + + /** ++ * Adds the axis exten attributes for a device, if available. ++ */ ++static void ++_gbe_add_device_axis_attributes(UFDevice frame_device, GeisDevice geis_device) ++{ ++ UFStatus status; ++ GeisFloat fval; ++ ++ UFAxis x_axis; ++ status = frame_device_get_axis_by_type(frame_device, UFAxisTypeX, &x_axis); ++ if (status != UFStatusSuccess) ++ { ++ geis_warning("failed to get X axis property from device '%s'", ++ geis_device_name(geis_device)); ++ } ++ else ++ { ++ fval = frame_axis_get_minimum(x_axis); ++ geis_device_add_attr(geis_device, geis_attr_new(GEIS_DEVICE_ATTRIBUTE_MIN_X, ++ GEIS_ATTR_TYPE_FLOAT, ++ &fval)); ++ ++ fval = frame_axis_get_maximum(x_axis); ++ geis_device_add_attr(geis_device, geis_attr_new(GEIS_DEVICE_ATTRIBUTE_MAX_X, ++ GEIS_ATTR_TYPE_FLOAT, ++ &fval)); ++ ++ fval = frame_axis_get_resolution(x_axis); ++ geis_device_add_attr(geis_device, geis_attr_new(GEIS_DEVICE_ATTRIBUTE_RES_X, ++ GEIS_ATTR_TYPE_FLOAT, ++ &fval)); ++ } ++ ++ UFAxis y_axis; ++ status = frame_device_get_axis_by_type(frame_device, UFAxisTypeY, &y_axis); ++ if (status != UFStatusSuccess) ++ { ++ geis_warning("failed to get Y axis property from device '%s'", ++ geis_device_name(geis_device)); ++ } ++ else ++ { ++ fval = frame_axis_get_minimum(y_axis); ++ geis_device_add_attr(geis_device, geis_attr_new(GEIS_DEVICE_ATTRIBUTE_MIN_Y, ++ GEIS_ATTR_TYPE_FLOAT, ++ &fval)); ++ ++ fval = frame_axis_get_maximum(y_axis); ++ geis_device_add_attr(geis_device, geis_attr_new(GEIS_DEVICE_ATTRIBUTE_MAX_Y, ++ GEIS_ATTR_TYPE_FLOAT, ++ &fval)); ++ ++ fval = frame_axis_get_resolution(y_axis); ++ geis_device_add_attr(geis_device, geis_attr_new(GEIS_DEVICE_ATTRIBUTE_RES_Y, ++ GEIS_ATTR_TYPE_FLOAT, ++ &fval)); ++ } ++} ++ ++ ++/** + * Reports an X11 device to the front end as a GEIS device. + */ + static void +@@ -837,6 +898,8 @@ + geis_device_add_attr(geis_device, attr); + } + ++ _gbe_add_device_axis_attributes(frame_device, geis_device); ++ + /* Report the device as a filterable entity. */ + static struct GeisFilterableAttribute attrs[] = { + { GEIS_DEVICE_ATTRIBUTE_NAME, GEIS_ATTR_TYPE_STRING, 0, NULL }, diff -Nru utouch-geis-2.2.9/debian/patches/series utouch-geis-2.2.9/debian/patches/series --- utouch-geis-2.2.9/debian/patches/series 2012-04-25 15:06:47.000000000 -0400 +++ utouch-geis-2.2.9/debian/patches/series 2012-04-27 12:59:48.000000000 -0400 @@ -1 +1,5 @@ fix-touch-coordinate-space.patch +lp985986-fix-touch-delta-calculation.patch +lp986215-calculate-pinch-delta-as-ratio.patch +lp813819-typedef-geis-subscription-flags.patch +lp987539-add-device-axis-attributes.patch