--- a/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java Thu May 21 15:04:23 2009 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java Fri May 22 16:09:45 2009 +0400
@@ -42,6 +42,7 @@
import sun.awt.dnd.SunDragSourceContextPeer;
import sun.awt.dnd.SunDropTargetContextPeer;
+import sun.awt.SunToolkit;
/**
* The XDragSourceContextPeer class is the class responsible for handling
@@ -666,6 +667,15 @@
case XConstants.ButtonRelease: {
XButtonEvent xbutton = ev.get_xbutton();
/*
+ * Ignore the buttons above 20 due to the bit limit for
+ * InputEvent.BUTTON_DOWN_MASK.
+ * One more bit is reserved for FIRST_HIGH_BIT.
+ */
+ if (xbutton.get_button() > SunToolkit.MAX_BUTTONS_SUPPORTED) {
+ return true;
+ }
+
+ /*
* On some X servers it could happen that ButtonRelease coordinates
* differ from the latest MotionNotify coordinates, so we need to
* process it as a mouse motion.