summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-10-20 14:22:37 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-10-20 14:22:37 -0400
commit359f0b0998c26d2501346334d8850a2248920f0f (patch)
treec665acef72f704ec47a0a8fd6079b93260a07896
parentcdc8b326dd0989003e2fdd7d5a605b5755acf221 (diff)
parentdc95372cb5b6a223ddb25a566a0f607c0a5c4e0d (diff)
downloadframeworks_base-359f0b0998c26d2501346334d8850a2248920f0f.zip
frameworks_base-359f0b0998c26d2501346334d8850a2248920f0f.tar.gz
frameworks_base-359f0b0998c26d2501346334d8850a2248920f0f.tar.bz2
Merge change Ib5736616 into eclair
* changes: Fix issue #2191572: Difficulties drawing window shade
-rw-r--r--services/java/com/android/server/InputDevice.java6
-rw-r--r--services/java/com/android/server/KeyInputQueue.java6
2 files changed, 10 insertions, 2 deletions
diff --git a/services/java/com/android/server/InputDevice.java b/services/java/com/android/server/InputDevice.java
index eaad3b7..6eb6242 100644
--- a/services/java/com/android/server/InputDevice.java
+++ b/services/java/com/android/server/InputDevice.java
@@ -65,6 +65,7 @@ public class InputDevice {
// This is the last generated pointer data, ordered to match
// mPointerIds.
+ boolean mSkipLastPointers;
int mLastNumPointers = 0;
final int[] mLastData = new int[MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS];
@@ -511,6 +512,11 @@ public class InputDevice {
long curTimeNano, Display display, int orientation,
int metaState) {
+ if (mSkipLastPointers) {
+ mSkipLastPointers = false;
+ mLastNumPointers = 0;
+ }
+
if (mNextNumPointers <= 0 && mLastNumPointers <= 0) {
return null;
}
diff --git a/services/java/com/android/server/KeyInputQueue.java b/services/java/com/android/server/KeyInputQueue.java
index 5d65c71..d68ccfa 100644
--- a/services/java/com/android/server/KeyInputQueue.java
+++ b/services/java/com/android/server/KeyInputQueue.java
@@ -689,7 +689,8 @@ public abstract class KeyInputQueue {
ev, curTime, curTimeNano);
if (doMotion && ms.mNextNumPointers > 0
- && ms.mLastNumPointers == 0) {
+ && (ms.mLastNumPointers == 0
+ || ms.mSkipLastPointers)) {
doMotion = !generateVirtualKeyDown(di,
ev, curTime, curTimeNano);
}
@@ -703,7 +704,7 @@ public abstract class KeyInputQueue {
me = ms.generateAbsMotion(di, curTime,
curTimeNano, mDisplay,
mOrientation, mGlobalMetaState);
- if (false) Log.v(TAG, "Absolute: x="
+ if (DEBUG_POINTERS) Log.v(TAG, "Absolute: x="
+ di.mAbs.mNextData[MotionEvent.SAMPLE_X]
+ " y="
+ di.mAbs.mNextData[MotionEvent.SAMPLE_Y]
@@ -729,6 +730,7 @@ public abstract class KeyInputQueue {
ms.mLastData, 0,
num * MotionEvent.NUM_SAMPLE_DATA);
ms.mLastNumPointers = num;
+ ms.mSkipLastPointers = true;
}
ms.finish();