src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java

Print this page




 525     private void processDrop(XButtonEvent xbutton) {
 526         try {
 527             dragProtocol.initiateDrop(xbutton.get_x_root(),
 528                                       xbutton.get_y_root(),
 529                                       sourceAction, sourceActions,
 530                                       xbutton.get_time());
 531         } catch (XException e) {
 532             cleanup(xbutton.get_time());
 533         }
 534     }
 535 
 536     private boolean processProxyModeEvent(XEvent ev) {
 537         if (getProxyModeSourceWindow() == 0) {
 538             return false;
 539         }
 540 
 541         if (ev.get_type() != (int)XConstants.ClientMessage) {
 542             return false;
 543         }
 544 
 545         if (logger.isLoggable(PlatformLogger.FINEST)) {
 546             logger.finest("        proxyModeSourceWindow=" +
 547                           getProxyModeSourceWindow() +
 548                           " ev=" + ev);
 549         }
 550 
 551         XClientMessageEvent xclient = ev.get_xclient();
 552 
 553         Iterator dragProtocols = XDragAndDropProtocols.getDragSourceProtocols();
 554         while (dragProtocols.hasNext()) {
 555             XDragSourceProtocol dragProtocol =
 556                 (XDragSourceProtocol)dragProtocols.next();
 557             if (dragProtocol.processProxyModeEvent(xclient,
 558                                                    getProxyModeSourceWindow())) {
 559                 return true;
 560             }
 561         }
 562 
 563         return false;
 564     }
 565 




 525     private void processDrop(XButtonEvent xbutton) {
 526         try {
 527             dragProtocol.initiateDrop(xbutton.get_x_root(),
 528                                       xbutton.get_y_root(),
 529                                       sourceAction, sourceActions,
 530                                       xbutton.get_time());
 531         } catch (XException e) {
 532             cleanup(xbutton.get_time());
 533         }
 534     }
 535 
 536     private boolean processProxyModeEvent(XEvent ev) {
 537         if (getProxyModeSourceWindow() == 0) {
 538             return false;
 539         }
 540 
 541         if (ev.get_type() != (int)XConstants.ClientMessage) {
 542             return false;
 543         }
 544 
 545         if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
 546             logger.finest("        proxyModeSourceWindow=" +
 547                           getProxyModeSourceWindow() +
 548                           " ev=" + ev);
 549         }
 550 
 551         XClientMessageEvent xclient = ev.get_xclient();
 552 
 553         Iterator dragProtocols = XDragAndDropProtocols.getDragSourceProtocols();
 554         while (dragProtocols.hasNext()) {
 555             XDragSourceProtocol dragProtocol =
 556                 (XDragSourceProtocol)dragProtocols.next();
 557             if (dragProtocol.processProxyModeEvent(xclient,
 558                                                    getProxyModeSourceWindow())) {
 559                 return true;
 560             }
 561         }
 562 
 563         return false;
 564     }
 565