Skip to content

Commit

Permalink
Make mouse forward and back work
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucaber committed Nov 13, 2023
1 parent 60d09c6 commit 9766bd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/java.desktop/unix/classes/sun/awt/wl/WLPointerEvent.java
Expand Up @@ -72,7 +72,9 @@ public enum PointerButtonCodes {
// see <linux/input-event-codes.h>
LEFT(0x110, MouseEvent.BUTTON1, InputEvent.BUTTON1_DOWN_MASK),
MIDDLE(0x112, MouseEvent.BUTTON2, InputEvent.BUTTON2_DOWN_MASK),
RIGHT(0x111, MouseEvent.BUTTON3, InputEvent.BUTTON3_DOWN_MASK);
RIGHT(0x111, MouseEvent.BUTTON3, InputEvent.BUTTON3_DOWN_MASK),
SIDE(0x113, 6, InputEvent.getMaskForButton(6)),
EXTRA(0x114, 7, InputEvent.getMaskForButton(7));

public final int linuxCode; // The code from <linux/input-event-codes.h>
public final int javaCode; // The code from MouseEvents.BUTTONx
Expand Down Expand Up @@ -116,6 +118,8 @@ public String toString() {
case LEFT -> "left";
case MIDDLE -> "middle";
case RIGHT -> "right";
case SIDE -> "side";
case EXTRA -> "extra";
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/java.desktop/unix/classes/sun/awt/wl/WLToolkit.java
Expand Up @@ -133,7 +133,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
*/
private static final int READ_RESULT_ERROR = 2;

private static final int MOUSE_BUTTONS_COUNT = 3;
private static final int MOUSE_BUTTONS_COUNT = 10;
private static final int AWT_MULTICLICK_DEFAULT_TIME_MS = 500;

private static boolean initialized = false;
Expand Down

0 comments on commit 9766bd1

Please sign in to comment.