src/solaris/classes/sun/awt/X11/XToolkit.java
Print this page
*** 925,934 ****
--- 925,939 ----
public FontPeer getFontPeer(String name, int style){
return new XFontPeer(name, style);
}
public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException {
+ final LightweightFrame f = SunToolkit.getLightweightFrame(dge.getComponent());
+ if (f != null) {
+ return f.createDragSourceContextPeer(dge);
+ }
+
return XDragSourceContextPeer.createDragSourceContextPeer(dge);
}
@SuppressWarnings("unchecked")
public <T extends DragGestureRecognizer> T
*** 936,945 ****
--- 941,955 ----
DragSource ds,
Component c,
int srcActions,
DragGestureListener dgl)
{
+ final LightweightFrame f = SunToolkit.getLightweightFrame(c);
+ if (f != null) {
+ return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
+ }
+
if (MouseDragGestureRecognizer.class.equals(recognizerClass))
return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
else
return null;
}