equal
deleted
inserted
replaced
40 import java.util.logging.*; |
40 import java.util.logging.*; |
41 import sun.awt.ComponentAccessor; |
41 import sun.awt.ComponentAccessor; |
42 |
42 |
43 import sun.awt.dnd.SunDragSourceContextPeer; |
43 import sun.awt.dnd.SunDragSourceContextPeer; |
44 import sun.awt.dnd.SunDropTargetContextPeer; |
44 import sun.awt.dnd.SunDropTargetContextPeer; |
|
45 import sun.awt.SunToolkit; |
45 |
46 |
46 /** |
47 /** |
47 * The XDragSourceContextPeer class is the class responsible for handling |
48 * The XDragSourceContextPeer class is the class responsible for handling |
48 * the interaction between the XDnD/Motif DnD subsystem and Java drag sources. |
49 * the interaction between the XDnD/Motif DnD subsystem and Java drag sources. |
49 * |
50 * |
664 processMouseMove(ev.get_xmotion()); |
665 processMouseMove(ev.get_xmotion()); |
665 return true; |
666 return true; |
666 case XConstants.ButtonRelease: { |
667 case XConstants.ButtonRelease: { |
667 XButtonEvent xbutton = ev.get_xbutton(); |
668 XButtonEvent xbutton = ev.get_xbutton(); |
668 /* |
669 /* |
|
670 * Ignore the buttons above 20 due to the bit limit for |
|
671 * InputEvent.BUTTON_DOWN_MASK. |
|
672 * One more bit is reserved for FIRST_HIGH_BIT. |
|
673 */ |
|
674 if (xbutton.get_button() > SunToolkit.MAX_BUTTONS_SUPPORTED) { |
|
675 return true; |
|
676 } |
|
677 |
|
678 /* |
669 * On some X servers it could happen that ButtonRelease coordinates |
679 * On some X servers it could happen that ButtonRelease coordinates |
670 * differ from the latest MotionNotify coordinates, so we need to |
680 * differ from the latest MotionNotify coordinates, so we need to |
671 * process it as a mouse motion. |
681 * process it as a mouse motion. |
672 */ |
682 */ |
673 XMotionEvent xmotion = new XMotionEvent(); |
683 XMotionEvent xmotion = new XMotionEvent(); |