Fix freeform window moving/resizing doesn't work
When window moving/resizing, TaskPositioner.register will call
InputMonitor.updateInputWindowsImmediately to add mDragWindowHandle
to InputDispatcher, and call InputManager.transferTouchFocus to transfer
touch focus to mDragWindowHandle. But old updateInputWindowsImmediately
implementation needs mUpdateInputWindowsPending being true before
updating input window handles. The mUpdateInputWindowsPending can only
be true when someone call InputMonitor.updateInputWindowsLw but
InputMonitor doesn't start to do it. So when the system is stable, there
is no pending updateInputWindowsLw operation, the
mUpdateInputWindowsPending is false. If we start to move/resize
freeform window, the mDragWindowHandle won't be added to
InputDispatcher, and it will cause InputManager.transferTouchFocus
failed. The failed touch focus transferring will cause window
moving/resizing not working correctly.
So the patch add an InputMonitor.updateInputWindowsImmediately variant
to ignore pending state, and update input windows immediately for
TaskPositioner. Ohter codes use the old
InputMonitor.updateInputWindowsImmediately without ignoring to keep the
compatibility.
Test: Manually moving and resizing correctly after modification.
Test: atest WindowFocusTests
Change-Id: Ia2fec8ca45a420607b3112cbd221cdae4a9a7e6b
Signed-off-by: utzcoz <utzcoz@gmail.com>
Loading
Please register or sign in to comment