equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Sun designates this |
7 * published by the Free Software Foundation. Sun designates this |
41 private XDropTargetProtocol protocol = null; |
41 private XDropTargetProtocol protocol = null; |
42 |
42 |
43 private XDropTargetEventProcessor() {} |
43 private XDropTargetEventProcessor() {} |
44 |
44 |
45 private boolean doProcessEvent(XEvent ev) { |
45 private boolean doProcessEvent(XEvent ev) { |
46 if (ev.get_type() == (int)XlibWrapper.DestroyNotify && |
46 if (ev.get_type() == (int)XConstants.DestroyNotify && |
47 protocol != null && |
47 protocol != null && |
48 ev.get_xany().get_window() == protocol.getSourceWindow()) { |
48 ev.get_xany().get_window() == protocol.getSourceWindow()) { |
49 protocol.cleanup(); |
49 protocol.cleanup(); |
50 protocol = null; |
50 protocol = null; |
51 return false; |
51 return false; |
52 } |
52 } |
53 |
53 |
54 if (ev.get_type() == (int)XlibWrapper.PropertyNotify) { |
54 if (ev.get_type() == (int)XConstants.PropertyNotify) { |
55 XPropertyEvent xproperty = ev.get_xproperty(); |
55 XPropertyEvent xproperty = ev.get_xproperty(); |
56 if (xproperty.get_atom() == |
56 if (xproperty.get_atom() == |
57 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom()) { |
57 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom()) { |
58 |
58 |
59 XDropTargetRegistry.getRegistry().updateEmbedderDropSite(xproperty.get_window()); |
59 XDropTargetRegistry.getRegistry().updateEmbedderDropSite(xproperty.get_window()); |
60 } |
60 } |
61 } |
61 } |
62 |
62 |
63 if (ev.get_type() != (int)XlibWrapper.ClientMessage) { |
63 if (ev.get_type() != (int)XConstants.ClientMessage) { |
64 return false; |
64 return false; |
65 } |
65 } |
66 |
66 |
67 boolean processed = false; |
67 boolean processed = false; |
68 XClientMessageEvent xclient = ev.get_xclient(); |
68 XClientMessageEvent xclient = ev.get_xclient(); |