-
Bug
-
Resolution: Unresolved
-
P4
-
10, 11
-
linux
The test test/java/awt/Mouse/MouseDragEvent/MouseDraggedTest.java fails on Linux for extra mouse buttons.
This is because Xsystem is not set state for the extra button event.
See the comment for the XWindow.handleMotionNotify(XEvent) method:
---------------------------
//this doesn't work for extra buttons because Xsystem is sending state==0 for every extra button event.
// we can't correct it in MouseEvent class as we done it with modifiers, because exact type (DRAG|MOVE)
// should be passed from XWindow.
final int buttonsNumber = XToolkit.getNumberOfButtonsForMask();
for (int i = 0; i < buttonsNumber; i++){
// TODO : here is the bug in WM: extra buttons doesn't have state!=0 as they should.
if ((i != 4) && (i != 5)) {
mouseKeyState = mouseKeyState | (xme.get_state() & XlibUtil.getButtonMask(i + 1));
}
}
---------------------------
This is because Xsystem is not set state for the extra button event.
See the comment for the XWindow.handleMotionNotify(XEvent) method:
---------------------------
//this doesn't work for extra buttons because Xsystem is sending state==0 for every extra button event.
// we can't correct it in MouseEvent class as we done it with modifiers, because exact type (DRAG|MOVE)
// should be passed from XWindow.
final int buttonsNumber = XToolkit.getNumberOfButtonsForMask();
for (int i = 0; i < buttonsNumber; i++){
// TODO : here is the bug in WM: extra buttons doesn't have state!=0 as they should.
if ((i != 4) && (i != 5)) {
mouseKeyState = mouseKeyState | (xme.get_state() & XlibUtil.getButtonMask(i + 1));
}
}
---------------------------
- relates to
-
JDK-8080137 Dragged events for extra mouse buttons (4,5,6) are not generated on JSplitPane
-
- Resolved
-