mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-101256 Cannot disable scrollwheel tab switching
This commit is contained in:
@@ -324,7 +324,19 @@ public class IdeEventQueue extends EventQueue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchEvent(final AWTEvent e) {
|
||||
public void dispatchEvent(AWTEvent e) {
|
||||
if (SystemInfo.isXWindow && e instanceof MouseEvent && ((MouseEvent)e).getButton() > 3) {
|
||||
MouseEvent src = (MouseEvent)e;
|
||||
if (src.getButton() < 6) {
|
||||
e = new MouseWheelEvent(src.getComponent(), src.getID(), src.getWhen(),
|
||||
src.getModifiers() | InputEvent.SHIFT_DOWN_MASK, src.getX(), src.getY(),
|
||||
0, false, MouseWheelEvent.WHEEL_UNIT_SCROLL, src.getClickCount(), src.getButton() == 4 ? -1 : 1);
|
||||
}
|
||||
else {
|
||||
e = new MouseEvent(src.getComponent(), src.getID(), src.getWhen(), src.getModifiers() | (1 << 8 + src.getButton()),
|
||||
src.getX(), src.getY(), 1, src.isPopupTrigger(), src.getButton() - 2);
|
||||
}
|
||||
}
|
||||
boolean wasInputEvent = myIsInInputEvent;
|
||||
myIsInInputEvent = e instanceof InputEvent || e instanceof InputMethodEvent || e instanceof WindowEvent || e instanceof ActionEvent;
|
||||
AWTEvent oldEvent = myCurrentEvent;
|
||||
|
||||
Reference in New Issue
Block a user