提交 f2328e79 编写于 作者: N neugens

8234107: Several AWT modal dialog tests failing on Linux after JDK-8231991

Summary: Fix off by one in wheel detection logic
Reviewed-by: prr
上级 be681c62
......@@ -1011,8 +1011,8 @@ public class XBaseWindow {
int buttonState = 0;
buttonState = xbe.get_state() & XConstants.ALL_BUTTONS_MASK;
boolean isWheel = (theButton != XConstants.MouseWheelUp ||
theButton != XConstants.MouseWheelDown);
boolean isWheel = (theButton == XConstants.MouseWheelUp ||
theButton == XConstants.MouseWheelDown);
// don't give focus if it's just the mouse wheel turning
if (!isWheel) {
......
......@@ -208,8 +208,8 @@ final public class XConstants {
// those should probably be wrapped in a method or such
// as it may be possible to remap them via x11 configuration files
public static final int MouseWheelUp = buttons[4];
public static final int MouseWheelDown = buttons[5];
public static final int MouseWheelUp = buttons[3];
public static final int MouseWheelDown = buttons[4];
/* Notify modes */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册