Fix tap activating the left mouse button

This commit is contained in:
SerpentSpirale 2021-11-19 17:43:51 +01:00 committed by Boulay Mathias
parent 165cc2a8f0
commit 58a63b02eb

View File

@ -325,9 +325,9 @@ public class MinecraftGLView extends TextureView {
if(triggeredLeftMouseButton){
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_LEFT, false);
triggeredLeftMouseButton = false;
theHandler.removeMessages(MSG_LEFT_MOUSE_BUTTON_CHECK);
break;
}
theHandler.removeMessages(MSG_LEFT_MOUSE_BUTTON_CHECK);
// In case of a short click, just send a quick right click
if(!LauncherPreferences.PREF_DISABLE_GESTURES &&
@ -533,21 +533,6 @@ public class MinecraftGLView extends TextureView {
return false;
}
@Override
public boolean dispatchKeyEventPreIme(KeyEvent event) {
return super.dispatchKeyEventPreIme(event);
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
return super.dispatchKeyEvent(event);
}
@Override
public boolean dispatchKeyShortcutEvent(KeyEvent event) {
return super.dispatchKeyShortcutEvent(event);
}
/** Get the mouse direction as a string */
private String getMoving(float pos, boolean xOrY) {
if (pos == 0) return "STOPPED";
@ -576,6 +561,8 @@ public class MinecraftGLView extends TextureView {
return true;
}
/** @return the hotbar key, given the position. -1 if no key are pressed */
public int handleGuiBar(int x, int y) {
if (!CallbackBridge.isGrabbing()) return -1;