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

Commit

Permalink
Discard first click when a window is focused (#1532)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and bluemarvin committed Aug 7, 2019
1 parent 483f245 commit ff8fb56
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,10 @@ void handleMotionEvent(final int aHandle, final int aDevice, final boolean aPres
WindowWidget window = (WindowWidget) widget;
boolean focused = mWindows.getFocusedWindow() == window;
if (!focused && aPressed) {
// Do not send hover events to not focused windows.
// Focus the window when pressed
mWindows.focusWindow(window);
// Discard first click.
return;
} else if (!focused) {
// Do not send hover events to not focused windows.
widget = null;
Expand Down

0 comments on commit ff8fb56

Please sign in to comment.