64 * heirarchy of the specified window or 0 if none found.
65 */
66 private long getToplevelWindow(long window) {
67 XBaseWindow candWindow = XToolkit.windowToXWindow(window);
68 if (candWindow != null) {
69 XWindowPeer toplevel = candWindow.getToplevelXWindow();
70 if (toplevel != null && !(toplevel instanceof XEmbeddedFramePeer)) {
71 return toplevel.getWindow();
72 }
73 }
74
75 /* Traverse the ancestor tree from window up to the root and find
76 the top-level client window nearest to the root. */
77 do {
78 if (XlibUtil.isTrueToplevelWindow(window)) {
79 return window;
80 }
81
82 window = XlibUtil.getParentWindow(window);
83
84 } while (window != 0);
85
86 return window;
87 }
88
89 static final long getDnDProxyWindow() {
90 return XWindow.getXAWTRootWindow().getWindow();
91 }
92
93 private static final class EmbeddedDropSiteEntry {
94 private final long root;
95 private final long event_mask;
96 private List<XDropTargetProtocol> supportedProtocols;
97 private final HashSet<Long> nonXEmbedClientSites = new HashSet<Long>();
98 private final List<Long> sites = new ArrayList<Long>();
99
100 public EmbeddedDropSiteEntry(long root, long event_mask,
101 List<XDropTargetProtocol> supportedProtocols) {
102 if (supportedProtocols == null) {
103 throw new NullPointerException("Null supportedProtocols");
104 }
|
64 * heirarchy of the specified window or 0 if none found.
65 */
66 private long getToplevelWindow(long window) {
67 XBaseWindow candWindow = XToolkit.windowToXWindow(window);
68 if (candWindow != null) {
69 XWindowPeer toplevel = candWindow.getToplevelXWindow();
70 if (toplevel != null && !(toplevel instanceof XEmbeddedFramePeer)) {
71 return toplevel.getWindow();
72 }
73 }
74
75 /* Traverse the ancestor tree from window up to the root and find
76 the top-level client window nearest to the root. */
77 do {
78 if (XlibUtil.isTrueToplevelWindow(window)) {
79 return window;
80 }
81
82 window = XlibUtil.getParentWindow(window);
83
84 } while (window != XConstants.None);
85
86 return window;
87 }
88
89 static final long getDnDProxyWindow() {
90 return XWindow.getXAWTRootWindow().getWindow();
91 }
92
93 private static final class EmbeddedDropSiteEntry {
94 private final long root;
95 private final long event_mask;
96 private List<XDropTargetProtocol> supportedProtocols;
97 private final HashSet<Long> nonXEmbedClientSites = new HashSet<Long>();
98 private final List<Long> sites = new ArrayList<Long>();
99
100 public EmbeddedDropSiteEntry(long root, long event_mask,
101 List<XDropTargetProtocol> supportedProtocols) {
102 if (supportedProtocols == null) {
103 throw new NullPointerException("Null supportedProtocols");
104 }
|