6893325: JComboBox and dragging to an item outside the bounds of the containing JFrame is not selecting that
authordav
Tue, 22 Dec 2009 17:28:52 +0300
changeset 4829 21778cfb4353
parent 4828 86a569e6b967
child 4830 34aa9ad0f200
child 4831 85d01a4fe115
6893325: JComboBox and dragging to an item outside the bounds of the containing JFrame is not selecting that Reviewed-by: art, dcherepanov
jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java
--- a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Wed Dec 23 01:22:11 2009 +0300
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Tue Dec 22 17:28:52 2009 +0300
@@ -2144,9 +2144,11 @@
                         // Outside this toplevel hierarchy
                         // According to the specification of UngrabEvent, post it
                         // when press occurs outside of the window and not on its owned windows
-                        grabLog.fine("Generating UngrabEvent on {0} because not inside of shell", this);
-                        postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
-                        return;
+                        if (xbe.get_type() == XConstants.ButtonPress) {
+                            grabLog.fine("Generating UngrabEvent on {0} because not inside of shell", this);
+                            postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
+                            return;
+                        }
                     }
                     // First, get the toplevel
                     XWindowPeer toplevel = target.getToplevelXWindow();