-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-8.10
-
Yes
-
Low
-
rhel-sst-java
-
None
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
-
All
-
None
What were you trying to do that didn't work?
On Linux (X11 based systems), when a user clicks inside a JFrame to close an open JMenu or JPopupMenu and maintains the mouse button press to begin a drag, the subsequent MouseDragged events are incorrectly confined to the boundaries of the JFrame. The registered MouseMotionListener stops receiving events the moment the cursor moves outside the window.
This is a regression from the expected AWT/Swing behavior, which should maintain mouse input delivery to the originating component for the duration of the drag, regardless of window boundaries. Windows exhibits the correct behavior in the same test case.
What is the impact of this issue to you?
We worked with Oracle to open this following bug, but need to work with Red Hat to resolve.
https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8369028
Please provide the package NVR for which the bug is seen:
java-1.8.0-openjdk-1.8.0.452.b09-2.el8.x86_64
How reproducible is this bug?:
Always
Steps to reproduce
- Use the provided Java test case code (below).
- Run the application on a Linux system.
- Baseline Test (Expected Behavior):
a. Click inside the frame content pane (press the mouse button down).
b. Drag the cursor outside the JFrame boundary.
c. Verify: mouseDragged messages continue to be printed to the console (Correct).
d. Release the mouse button. - Bug Reproduction Test (Failing Behavior):
a. Click the "File" menu item to open the JMenu.
b. Click an empty area inside the JFrame to close the menu/popup, but do not release the mouse button (maintain the press).
c. While still pressing the mouse button, drag the cursor outside the JFrame boundary.
d. Verify: mouseDragged messages cease immediately upon the cursor crossing the window border. (Incorrect on Linux).
Expected results
The MouseMotionListener should continue to receive mouseDragged events when the cursor is moved outside the JFrame boundaries, just as it does during an uninterrupted drag sequence and as it does on Windows.
Actual results
On Linux only, mouseDragged events cease the moment the cursor crosses the JFrame border when the drag is initiated by the click that closes the menu/popup.