frameworks/base
Revision | 446ec14797ac3b378f11693492b9aa7222bca617 (tree) |
---|---|
Time | 2020-06-12 16:50:10 |
Author | utzcoz <utzcoz@outl...> |
Commiter | utzcoz |
Reset pointer icon type after leaving resizing region
We should reset pointer icon type when hover exit task. If we start freeform
window from Taskbar, and move pointer to resize region, the pointer type will
change to TYPE_*_DOUBLE_ARROW, but when we move pointer outer freeform window
resize region, the pointer type will keep to TYPE_*_DOUBLE_ARROW. The reset
operation will help to fix this problem.
Signed-off-by: utzcoz <utzcoz@outlook.com>
@@ -104,6 +104,22 @@ public class TaskTapPointerEventListener implements PointerEventListener { | ||
104 | 104 | } |
105 | 105 | } |
106 | 106 | break; |
107 | + | |
108 | + // region @boringdroid | |
109 | + // We should reset pointer icon type when hover exit task. If we start freeform | |
110 | + // window from Taskbar, and move pointer to resize region, the pointer type will | |
111 | + // change to TYPE_*_DOUBLE_ARROW, but when we move pointer outer freeform window | |
112 | + // resize region, the pointer type will keep to TYPE_*_DOUBLE_ARROW. The reset | |
113 | + // operation will help to fix this problem. | |
114 | + case MotionEvent.ACTION_HOVER_EXIT: { | |
115 | + mPointerIconType = TYPE_NOT_SPECIFIED; | |
116 | + final int x = (int) motionEvent.getX(); | |
117 | + final int y = (int) motionEvent.getY(); | |
118 | + mService.mH.obtainMessage(H.RESTORE_POINTER_ICON, | |
119 | + x, y, mDisplayContent).sendToTarget(); | |
120 | + } | |
121 | + break; | |
122 | + // endregion | |
107 | 123 | } |
108 | 124 | } |
109 | 125 |