• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-c誰得cocoaqtpythonrubywindowsphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

frameworks/base


Commit MetaInfo

修订版446ec14797ac3b378f11693492b9aa7222bca617 (tree)
时间2020-06-12 16:50:10
作者utzcoz <utzcoz@outl...>
Commiterutzcoz

Log Message

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>

更改概述

差异

--- a/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java
+++ b/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java
@@ -104,6 +104,22 @@ public class TaskTapPointerEventListener implements PointerEventListener {
104104 }
105105 }
106106 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
107123 }
108124 }
109125