Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit ff8fb56

Browse files
MortimerGorobluemarvin
authored andcommitted
Discard first click when a window is focused (#1532)
1 parent 483f245 commit ff8fb56

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,10 @@ void handleMotionEvent(final int aHandle, final int aDevice, final boolean aPres
651651
WindowWidget window = (WindowWidget) widget;
652652
boolean focused = mWindows.getFocusedWindow() == window;
653653
if (!focused && aPressed) {
654-
// Do not send hover events to not focused windows.
654+
// Focus the window when pressed
655655
mWindows.focusWindow(window);
656+
// Discard first click.
657+
return;
656658
} else if (!focused) {
657659
// Do not send hover events to not focused windows.
658660
widget = null;

0 commit comments

Comments
 (0)