Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0d4186c1 authored by utzcoz's avatar utzcoz Committed by Bruno Martins
Browse files

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: default avatarutzcoz <utzcoz@gmail.com>
parent 8de96493
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment