equal
deleted
inserted
replaced
100 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO, |
100 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO, |
101 0, 0xFFFF, false, |
101 0, 0xFFFF, false, |
102 XConstants.AnyPropertyType); |
102 XConstants.AnyPropertyType); |
103 |
103 |
104 try { |
104 try { |
105 status = wpg.execute(XToolkit.IgnoreBadWindowHandler); |
105 status = wpg.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance()); |
106 |
106 |
107 /* |
107 /* |
108 * DragICCI.h: |
108 * DragICCI.h: |
109 * |
109 * |
110 * typedef struct _xmDragReceiverInfoStruct{ |
110 * typedef struct _xmDragReceiverInfoStruct{ |
160 unsafe.putShort(data + 8, (short)0); /* num_drop_sites */ |
160 unsafe.putShort(data + 8, (short)0); /* num_drop_sites */ |
161 unsafe.putShort(data + 10, (short)0); /* pad */ |
161 unsafe.putShort(data + 10, (short)0); /* pad */ |
162 unsafe.putInt(data + 12, dataSize); |
162 unsafe.putInt(data + 12, dataSize); |
163 } |
163 } |
164 |
164 |
165 XToolkit.WITH_XERROR_HANDLER(XWM.VerifyChangePropertyHandler); |
165 XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); |
166 XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder, |
166 XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder, |
167 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), |
167 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), |
168 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), |
168 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), |
169 8, XConstants.PropModeReplace, |
169 8, XConstants.PropModeReplace, |
170 data, dataSize); |
170 data, dataSize); |
202 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO, |
202 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO, |
203 0, 0xFFFF, false, |
203 0, 0xFFFF, false, |
204 XConstants.AnyPropertyType); |
204 XConstants.AnyPropertyType); |
205 |
205 |
206 try { |
206 try { |
207 status = wpg.execute(XToolkit.IgnoreBadWindowHandler); |
207 status = wpg.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance()); |
208 |
208 |
209 /* |
209 /* |
210 * DragICCI.h: |
210 * DragICCI.h: |
211 * |
211 * |
212 * typedef struct _xmDragReceiverInfoStruct{ |
212 * typedef struct _xmDragReceiverInfoStruct{ |
234 tproxy = MotifDnDConstants.Swapper.swap(tproxy); |
234 tproxy = MotifDnDConstants.Swapper.swap(tproxy); |
235 } |
235 } |
236 |
236 |
237 unsafe.putInt(data + 4, tproxy); |
237 unsafe.putInt(data + 4, tproxy); |
238 |
238 |
239 XToolkit.WITH_XERROR_HANDLER(XWM.VerifyChangePropertyHandler); |
239 XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); |
240 XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder, |
240 XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder, |
241 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), |
241 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), |
242 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), |
242 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), |
243 8, XConstants.PropModeReplace, |
243 8, XConstants.PropModeReplace, |
244 data, dataSize); |
244 data, dataSize); |
274 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO, |
274 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO, |
275 0, 0xFFFF, false, |
275 0, 0xFFFF, false, |
276 XConstants.AnyPropertyType); |
276 XConstants.AnyPropertyType); |
277 |
277 |
278 try { |
278 try { |
279 status = wpg.execute(XToolkit.IgnoreBadWindowHandler); |
279 status = wpg.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance()); |
280 |
280 |
281 /* |
281 /* |
282 * DragICCI.h: |
282 * DragICCI.h: |
283 * |
283 * |
284 * typedef struct _xmDragReceiverInfoStruct{ |
284 * typedef struct _xmDragReceiverInfoStruct{ |
323 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO, |
323 MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO, |
324 0, 0xFFFF, false, |
324 0, 0xFFFF, false, |
325 XConstants.AnyPropertyType); |
325 XConstants.AnyPropertyType); |
326 |
326 |
327 try { |
327 try { |
328 int status = wpg.execute(XToolkit.IgnoreBadWindowHandler); |
328 int status = wpg.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance()); |
329 |
329 |
330 if (status == (int)XConstants.Success && wpg.getData() != 0 && |
330 if (status == (int)XConstants.Success && wpg.getData() != 0 && |
331 wpg.getActualType() != 0 && wpg.getActualFormat() == 8 && |
331 wpg.getActualType() != 0 && wpg.getActualFormat() == 8 && |
332 wpg.getNumberOfItems() >= |
332 wpg.getNumberOfItems() >= |
333 MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) { |
333 MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) { |
373 0, 0xFFFF, |
373 0, 0xFFFF, |
374 false, |
374 false, |
375 MotifDnDConstants.XA_MOTIF_DRAG_INITIATOR_INFO.getAtom()); |
375 MotifDnDConstants.XA_MOTIF_DRAG_INITIATOR_INFO.getAtom()); |
376 |
376 |
377 try { |
377 try { |
378 int status = wpg.execute(XToolkit.IgnoreBadWindowHandler); |
378 int status = wpg.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance()); |
379 |
379 |
380 if (status == XConstants.Success && wpg.getData() != 0 && |
380 if (status == XConstants.Success && wpg.getData() != 0 && |
381 wpg.getActualType() == |
381 wpg.getActualType() == |
382 MotifDnDConstants.XA_MOTIF_DRAG_INITIATOR_INFO.getAtom() && |
382 MotifDnDConstants.XA_MOTIF_DRAG_INITIATOR_INFO.getAtom() && |
383 wpg.getActualFormat() == 8 && |
383 wpg.getActualFormat() == 8 && |
410 * Select for StructureNotifyMask to receive DestroyNotify in case of source |
410 * Select for StructureNotifyMask to receive DestroyNotify in case of source |
411 * crash. |
411 * crash. |
412 */ |
412 */ |
413 XWindowAttributes wattr = new XWindowAttributes(); |
413 XWindowAttributes wattr = new XWindowAttributes(); |
414 try { |
414 try { |
415 XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler); |
415 XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); |
416 int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), |
416 int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), |
417 source_win, wattr.pData); |
417 source_win, wattr.pData); |
418 |
418 |
419 XToolkit.RESTORE_XERROR_HANDLER(); |
419 XToolkit.RESTORE_XERROR_HANDLER(); |
420 |
420 |
427 source_win_mask = wattr.get_your_event_mask(); |
427 source_win_mask = wattr.get_your_event_mask(); |
428 } finally { |
428 } finally { |
429 wattr.dispose(); |
429 wattr.dispose(); |
430 } |
430 } |
431 |
431 |
432 XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler); |
432 XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); |
433 XlibWrapper.XSelectInput(XToolkit.getDisplay(), source_win, |
433 XlibWrapper.XSelectInput(XToolkit.getDisplay(), source_win, |
434 source_win_mask | |
434 source_win_mask | |
435 XConstants.StructureNotifyMask); |
435 XConstants.StructureNotifyMask); |
436 |
436 |
437 XToolkit.RESTORE_XERROR_HANDLER(); |
437 XToolkit.RESTORE_XERROR_HANDLER(); |
1018 } |
1018 } |
1019 |
1019 |
1020 if (sourceWindow != 0) { |
1020 if (sourceWindow != 0) { |
1021 XToolkit.awtLock(); |
1021 XToolkit.awtLock(); |
1022 try { |
1022 try { |
1023 XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler); |
1023 XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); |
1024 XlibWrapper.XSelectInput(XToolkit.getDisplay(), sourceWindow, |
1024 XlibWrapper.XSelectInput(XToolkit.getDisplay(), sourceWindow, |
1025 sourceWindowMask); |
1025 sourceWindowMask); |
1026 XToolkit.RESTORE_XERROR_HANDLER(); |
1026 XToolkit.RESTORE_XERROR_HANDLER(); |
1027 } finally { |
1027 } finally { |
1028 XToolkit.awtUnlock(); |
1028 XToolkit.awtUnlock(); |