Skip to content

Commit

Permalink
Do not forward motion events to GeckoSession when library panels are …
Browse files Browse the repository at this point in the history
…visible in the window (MozillaReality#2476)
  • Loading branch information
MortimerGoro authored and Alexandre Lissy committed Jan 21, 2020
1 parent 753625e commit 8afb5e4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1215,8 +1215,12 @@ public boolean onTouchEvent(MotionEvent aEvent) {

@Override
public boolean onGenericMotionEvent(MotionEvent aEvent) {
GeckoSession session = mSession.getGeckoSession();
return (session != null) && session.getPanZoomController().onMotionEvent(aEvent) == PanZoomController.INPUT_RESULT_HANDLED;
if (mView != null) {
return super.onGenericMotionEvent(aEvent);
} else {
GeckoSession session = mSession.getGeckoSession();
return (session != null) && session.getPanZoomController().onMotionEvent(aEvent) == PanZoomController.INPUT_RESULT_HANDLED;
}
}

private void setPrivateBrowsingEnabled(boolean isEnabled) {
Expand Down

0 comments on commit 8afb5e4

Please sign in to comment.