=== modified file 'debian/changelog'
--- debian/changelog	2011-05-31 14:09:36 +0000
+++ debian/changelog	2011-06-03 18:07:18 +0000
@@ -1,3 +1,10 @@
+qt4-x11 (4:4.7.3-1ubuntu2) UNRELEASED; urgency=low
+
+  * Fix touch end event handling, LP: #785433
+    - Updated kubuntu_28_xi2.1.patch with the fix
+
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 03 Jun 2011 09:42:09 -0400
+
 qt4-x11 (4:4.7.3-1ubuntu1) oneiric; urgency=low
 
   * Merge from Debian unstable, remaining changes:

=== modified file 'debian/patches/kubuntu_28_xi2.1.patch'
--- debian/patches/kubuntu_28_xi2.1.patch	2011-03-03 18:31:54 +0000
+++ debian/patches/kubuntu_28_xi2.1.patch	2011-06-03 18:07:18 +0000
@@ -492,7 +492,7 @@
      default:
          break;
      }
-@@ -5081,6 +5176,184 @@
+@@ -5081,6 +5176,186 @@
      return true;
  }
  
@@ -650,7 +650,14 @@
 +        tp->setState(Qt::TouchPointReleased | primary);
 +        if (qAppPriv->appTouchPoints.isEmpty())
 +            send = false;
-+
++    }
++
++    if (send) {
++        qAppPriv->activeDeviceType = tdi.directTouch ? QTouchEvent::TouchScreen : QTouchEvent::TouchPad;
++        QApplicationPrivate::translateRawTouchEvent(0, qAppPriv->activeDeviceType, qAppPriv->appTouchPoints);
++    }
++
++    if (event->evtype == XI_TouchEnd) {
 +        for (int i = 0; i < qAppPriv->appTouchPoints.size(); ++i) {
 +            if (qAppPriv->appTouchPoints[i].id() == trackingId) {
 +                qAppPriv->appTouchPoints.removeAt(i);
@@ -666,11 +673,6 @@
 +        }
 +    }
 +
-+    if (send) {
-+        qAppPriv->activeDeviceType = tdi.directTouch ? QTouchEvent::TouchScreen : QTouchEvent::TouchPad;
-+        QApplicationPrivate::translateRawTouchEvent(0, qAppPriv->activeDeviceType, qAppPriv->appTouchPoints);
-+    }
-+
 +    return true;
 +}
 +#endif

