Skip to content

Commit

Permalink
fix #1489: Allow scrolling another window without clicking it first
Browse files Browse the repository at this point in the history
  • Loading branch information
haanhvu authored and felipeerias committed Oct 1, 2024
1 parent 4e8797b commit 8026a64
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,6 @@ public void handleTouchEvent(MotionEvent aEvent) {
for (WindowListener listener: mListeners) {
listener.onFocusRequest(this);
}
// Return to discard first click after focus
return;
}
} else if (aEvent.getAction() == MotionEvent.ACTION_UP || aEvent.getAction() == MotionEvent.ACTION_CANCEL) {
mClickedAfterFocus = false;
Expand Down Expand Up @@ -885,8 +883,10 @@ public void handleHoverEvent(MotionEvent aEvent) {
updateBorder();
}

if (!mActive) {
// Do not send touch events to not focused windows.
if (!mActive
&& aEvent.getAction() != MotionEvent.ACTION_SCROLL
&& aEvent.getAction() != MotionEvent.ACTION_HOVER_MOVE) {
// Do not send hover events to not focused windows, except for scrolling and moving events.
return;
}

Expand Down

0 comments on commit 8026a64

Please sign in to comment.