Hi all, I filed a bug related to how mouse wheel interact with focus events:
https://bugs.openjdk.java.net/browse/JDK-8231991 The issue seems to be that we still consider mouse button press/release the wheel event. This is a bit tricky since X11 doesn't really have the concept of mouse wheel but those events are indeed synthesized from button press and converted into the scoll-up/down logic, furthermore, it's possible to remap the buttons from the de-facto standard of button 4 and 5 to anything else, however I'm not sure how to detect which button is configured for the mouse wheel. In this patch I introduced a couple of new constants in XConstants.java for now hard coded to button 4 and 5, but we can refactor later if needed the way those constants are filled (or if anyone has an idea I'll be happy to fix this right away): http://cr.openjdk.java.net/~neugens/JDK-8231991/webrev.00/ I also added a test case. The fix is essentially to skip the focus logic if this is a mouse wheel event. I tried with a few different configurations and all seems to work correctly, but I appreciate feedback here since this areas is rather tricky. I aim at backporting this fix - if approved - all the way down to 8, I'm not sure if the addition of those two constants is accepted however in the backports, perhaps I should just hard code the values for these instead? Thanks in advance for the feedback. Cheers, Mario -- Mario Torre Associate Manager, Software Engineering Red Hat GmbH <https://www.redhat.com> 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898