src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 30,39 ****
--- 30,40 ----
import java.io.IOException;
import java.util.Iterator;
+ import sun.awt.AWTAccessor;
import sun.util.logging.PlatformLogger;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
*** 186,201 ****
}
// If source is an XEmbedCanvasPeer, passes the event to it for processing and
// return true if the event is forwarded to the XEmbed child.
// Otherwise, does nothing and return false.
- @SuppressWarnings("deprecation")
private boolean processSunDropTargetEvent(SunDropTargetEvent event) {
Object source = event.getSource();
if (source instanceof Component) {
! ComponentPeer peer = ((Component)source).getPeer();
if (peer instanceof XEmbedCanvasPeer) {
XEmbedCanvasPeer xEmbedCanvasPeer = (XEmbedCanvasPeer)peer;
/* The native context is the pointer to the XClientMessageEvent
structure. */
long ctxt = getNativeDragContext();
--- 187,202 ----
}
// If source is an XEmbedCanvasPeer, passes the event to it for processing and
// return true if the event is forwarded to the XEmbed child.
// Otherwise, does nothing and return false.
private boolean processSunDropTargetEvent(SunDropTargetEvent event) {
Object source = event.getSource();
if (source instanceof Component) {
! Object peer = AWTAccessor.getComponentAccessor()
! .getPeer((Component) source);
if (peer instanceof XEmbedCanvasPeer) {
XEmbedCanvasPeer xEmbedCanvasPeer = (XEmbedCanvasPeer)peer;
/* The native context is the pointer to the XClientMessageEvent
structure. */
long ctxt = getNativeDragContext();