< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java

Print this page




 636                                           XlibWrapper.larg2,  // subwindow
 637                                           XlibWrapper.larg3,  // x_root
 638                                           XlibWrapper.larg4,  // y_root
 639                                           XlibWrapper.larg5,  // x
 640                                           XlibWrapper.larg6,  // y
 641                                           XlibWrapper.larg7); // modifiers
 642                 XMotionEvent xmotion = new XMotionEvent();
 643                 try {
 644                     xmotion.set_type(XConstants.MotionNotify);
 645                     xmotion.set_serial(xkey.get_serial());
 646                     xmotion.set_send_event(xkey.get_send_event());
 647                     xmotion.set_display(xkey.get_display());
 648                     xmotion.set_window(xkey.get_window());
 649                     xmotion.set_root(xkey.get_root());
 650                     xmotion.set_subwindow(xkey.get_subwindow());
 651                     xmotion.set_time(xkey.get_time());
 652                     xmotion.set_x(xkey.get_x());
 653                     xmotion.set_y(xkey.get_y());
 654                     xmotion.set_x_root(xkey.get_x_root());
 655                     xmotion.set_y_root(xkey.get_y_root());
 656                     xmotion.set_state((int)Native.getLong(XlibWrapper.larg7));
 657                     // we do not use this field, so it's unset for now
 658                     // xmotion.set_is_hint(???);
 659                     xmotion.set_same_screen(xkey.get_same_screen());
 660 
 661                     //It's safe to use key event as motion event since we use only their common fields.
 662                     processMouseMove(xmotion);
 663                 } finally {
 664                     xmotion.dispose();
 665                 }
 666                 break;
 667             }
 668             }
 669             return true;
 670         }
 671         case XConstants.ButtonPress:
 672             return true;
 673         case XConstants.MotionNotify:
 674             processMouseMove(ev.get_xmotion());
 675             return true;
 676         case XConstants.ButtonRelease: {




 636                                           XlibWrapper.larg2,  // subwindow
 637                                           XlibWrapper.larg3,  // x_root
 638                                           XlibWrapper.larg4,  // y_root
 639                                           XlibWrapper.larg5,  // x
 640                                           XlibWrapper.larg6,  // y
 641                                           XlibWrapper.larg7); // modifiers
 642                 XMotionEvent xmotion = new XMotionEvent();
 643                 try {
 644                     xmotion.set_type(XConstants.MotionNotify);
 645                     xmotion.set_serial(xkey.get_serial());
 646                     xmotion.set_send_event(xkey.get_send_event());
 647                     xmotion.set_display(xkey.get_display());
 648                     xmotion.set_window(xkey.get_window());
 649                     xmotion.set_root(xkey.get_root());
 650                     xmotion.set_subwindow(xkey.get_subwindow());
 651                     xmotion.set_time(xkey.get_time());
 652                     xmotion.set_x(xkey.get_x());
 653                     xmotion.set_y(xkey.get_y());
 654                     xmotion.set_x_root(xkey.get_x_root());
 655                     xmotion.set_y_root(xkey.get_y_root());
 656                     xmotion.set_state(Native.getInt(XlibWrapper.larg7));
 657                     // we do not use this field, so it's unset for now
 658                     // xmotion.set_is_hint(???);
 659                     xmotion.set_same_screen(xkey.get_same_screen());
 660 
 661                     //It's safe to use key event as motion event since we use only their common fields.
 662                     processMouseMove(xmotion);
 663                 } finally {
 664                     xmotion.dispose();
 665                 }
 666                 break;
 667             }
 668             }
 669             return true;
 670         }
 671         case XConstants.ButtonPress:
 672             return true;
 673         case XConstants.MotionNotify:
 674             processMouseMove(ev.get_xmotion());
 675             return true;
 676         case XConstants.ButtonRelease: {


< prev index next >