diff --git a/src/solaris/classes/sun/awt/X11/XWindowPeer.java b/src/solaris/classes/sun/awt/X11/XWindowPeer.java index 30d93365b6e20991be2c98a35b67704741201ff0..0b917c56b1fee8bfc854f599b00777d6d0b1179d 100644 --- a/src/solaris/classes/sun/awt/X11/XWindowPeer.java +++ b/src/solaris/classes/sun/awt/X11/XWindowPeer.java @@ -2144,9 +2144,11 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, // 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();