Merge change Ib5736616 into eclair
* changes: Fix issue #2191572: Difficulties drawing window shade
This commit is contained in:
@ -65,6 +65,7 @@ public class InputDevice {
|
|||||||
|
|
||||||
// This is the last generated pointer data, ordered to match
|
// This is the last generated pointer data, ordered to match
|
||||||
// mPointerIds.
|
// mPointerIds.
|
||||||
|
boolean mSkipLastPointers;
|
||||||
int mLastNumPointers = 0;
|
int mLastNumPointers = 0;
|
||||||
final int[] mLastData = new int[MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS];
|
final int[] mLastData = new int[MotionEvent.NUM_SAMPLE_DATA * MAX_POINTERS];
|
||||||
|
|
||||||
@ -511,6 +512,11 @@ public class InputDevice {
|
|||||||
long curTimeNano, Display display, int orientation,
|
long curTimeNano, Display display, int orientation,
|
||||||
int metaState) {
|
int metaState) {
|
||||||
|
|
||||||
|
if (mSkipLastPointers) {
|
||||||
|
mSkipLastPointers = false;
|
||||||
|
mLastNumPointers = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (mNextNumPointers <= 0 && mLastNumPointers <= 0) {
|
if (mNextNumPointers <= 0 && mLastNumPointers <= 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -689,7 +689,8 @@ public abstract class KeyInputQueue {
|
|||||||
ev, curTime, curTimeNano);
|
ev, curTime, curTimeNano);
|
||||||
|
|
||||||
if (doMotion && ms.mNextNumPointers > 0
|
if (doMotion && ms.mNextNumPointers > 0
|
||||||
&& ms.mLastNumPointers == 0) {
|
&& (ms.mLastNumPointers == 0
|
||||||
|
|| ms.mSkipLastPointers)) {
|
||||||
doMotion = !generateVirtualKeyDown(di,
|
doMotion = !generateVirtualKeyDown(di,
|
||||||
ev, curTime, curTimeNano);
|
ev, curTime, curTimeNano);
|
||||||
}
|
}
|
||||||
@ -703,7 +704,7 @@ public abstract class KeyInputQueue {
|
|||||||
me = ms.generateAbsMotion(di, curTime,
|
me = ms.generateAbsMotion(di, curTime,
|
||||||
curTimeNano, mDisplay,
|
curTimeNano, mDisplay,
|
||||||
mOrientation, mGlobalMetaState);
|
mOrientation, mGlobalMetaState);
|
||||||
if (false) Log.v(TAG, "Absolute: x="
|
if (DEBUG_POINTERS) Log.v(TAG, "Absolute: x="
|
||||||
+ di.mAbs.mNextData[MotionEvent.SAMPLE_X]
|
+ di.mAbs.mNextData[MotionEvent.SAMPLE_X]
|
||||||
+ " y="
|
+ " y="
|
||||||
+ di.mAbs.mNextData[MotionEvent.SAMPLE_Y]
|
+ di.mAbs.mNextData[MotionEvent.SAMPLE_Y]
|
||||||
@ -729,6 +730,7 @@ public abstract class KeyInputQueue {
|
|||||||
ms.mLastData, 0,
|
ms.mLastData, 0,
|
||||||
num * MotionEvent.NUM_SAMPLE_DATA);
|
num * MotionEvent.NUM_SAMPLE_DATA);
|
||||||
ms.mLastNumPointers = num;
|
ms.mLastNumPointers = num;
|
||||||
|
ms.mSkipLastPointers = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ms.finish();
|
ms.finish();
|
||||||
|
Reference in New Issue
Block a user