src/java.desktop/unix/classes/sun/awt/X11/XMSelection.java
changeset 52987 468829d1983e
parent 52528 edc729e2ee36
equal deleted inserted replaced
52986:0d0f59acf65a 52987:468829d1983e
    95 
    95 
    96     static void initScreen(long display, final int screen) {
    96     static void initScreen(long display, final int screen) {
    97         XToolkit.awtLock();
    97         XToolkit.awtLock();
    98         try {
    98         try {
    99             long root = XlibWrapper.RootWindow(display,screen);
    99             long root = XlibWrapper.RootWindow(display,screen);
   100             XlibWrapper.XSelectInput(display, root, XConstants.StructureNotifyMask);
   100             XWindowAttributes wattr = new XWindowAttributes();
       
   101             try {
       
   102                 XlibWrapper.XGetWindowAttributes(display, root, wattr.pData);
       
   103                 XlibWrapper.XSelectInput(display, root,
       
   104                         XConstants.StructureNotifyMask |
       
   105                         wattr.get_your_event_mask());
       
   106             } finally {
       
   107                 wattr.dispose();
       
   108             }
   101             XToolkit.addEventDispatcher(root,
   109             XToolkit.addEventDispatcher(root,
   102                     new XEventDispatcher() {
   110                     new XEventDispatcher() {
   103                         public void dispatchEvent(XEvent ev) {
   111                         public void dispatchEvent(XEvent ev) {
   104                                 processRootEvent(ev, screen);
   112                                 processRootEvent(ev, screen);
   105                             }
   113                             }