378 msg.dispose();
379 }
380 }
381
382 public boolean processProxyModeEvent(XClientMessageEvent xclient,
383 long sourceWindow) {
384 if (xclient.get_message_type() == XDnDConstants.XA_XdndStatus.getAtom() ||
385 xclient.get_message_type() == XDnDConstants.XA_XdndFinished.getAtom()) {
386
387 if (xclient.get_message_type() == XDnDConstants.XA_XdndFinished.getAtom()) {
388 XDragSourceContextPeer.setProxyModeSourceWindow(0);
389 }
390
391 // This can happen if the drag operation started in the XEmbed server.
392 // In this case there is no need to forward it elsewhere, we should
393 // process it here.
394 if (xclient.get_window() == sourceWindow) {
395 return false;
396 }
397
398 if (logger.isLoggable(PlatformLogger.FINEST)) {
399 logger.finest(" sourceWindow=" + sourceWindow +
400 " get_window=" + xclient.get_window() +
401 " xclient=" + xclient);
402 }
403 xclient.set_data(0, xclient.get_window());
404 xclient.set_window(sourceWindow);
405
406 assert XToolkit.isAWTLockHeldByCurrentThread();
407
408 XlibWrapper.XSendEvent(XToolkit.getDisplay(), sourceWindow,
409 false, XConstants.NoEventMask,
410 xclient.pData);
411
412 return true;
413 }
414
415 return false;
416 }
417
418 // TODO: register this runnable with XDnDSelection.
|
378 msg.dispose();
379 }
380 }
381
382 public boolean processProxyModeEvent(XClientMessageEvent xclient,
383 long sourceWindow) {
384 if (xclient.get_message_type() == XDnDConstants.XA_XdndStatus.getAtom() ||
385 xclient.get_message_type() == XDnDConstants.XA_XdndFinished.getAtom()) {
386
387 if (xclient.get_message_type() == XDnDConstants.XA_XdndFinished.getAtom()) {
388 XDragSourceContextPeer.setProxyModeSourceWindow(0);
389 }
390
391 // This can happen if the drag operation started in the XEmbed server.
392 // In this case there is no need to forward it elsewhere, we should
393 // process it here.
394 if (xclient.get_window() == sourceWindow) {
395 return false;
396 }
397
398 if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
399 logger.finest(" sourceWindow=" + sourceWindow +
400 " get_window=" + xclient.get_window() +
401 " xclient=" + xclient);
402 }
403 xclient.set_data(0, xclient.get_window());
404 xclient.set_window(sourceWindow);
405
406 assert XToolkit.isAWTLockHeldByCurrentThread();
407
408 XlibWrapper.XSendEvent(XToolkit.getDisplay(), sourceWindow,
409 false, XConstants.NoEventMask,
410 xclient.pData);
411
412 return true;
413 }
414
415 return false;
416 }
417
418 // TODO: register this runnable with XDnDSelection.
|