jdk/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java
changeset 2802 d05a9dcc8296
parent 439 3488710b02f8
child 3938 ef327bd847c0
child 4254 b63d0a7f93a7
equal deleted inserted replaced
2760:f038acdbdf9c 2802:d05a9dcc8296
   166                 int dest_x = p.x;
   166                 int dest_x = p.x;
   167                 int dest_y = p.y;
   167                 int dest_y = p.y;
   168                 if (dest_x >= 0 && dest_y >= 0) {
   168                 if (dest_x >= 0 && dest_y >= 0) {
   169                     XWindowAttributes wattr = new XWindowAttributes();
   169                     XWindowAttributes wattr = new XWindowAttributes();
   170                     try {
   170                     try {
   171                         XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler);
   171                         XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance());
   172                         int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
   172                         int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
   173                                                                       window, wattr.pData);
   173                                                                       window, wattr.pData);
   174                         XToolkit.RESTORE_XERROR_HANDLER();
   174                         XToolkit.RESTORE_XERROR_HANDLER();
   175 
   175 
   176                         if (status == 0 ||
   176                         if (status == 0 ||
   220         try {
   220         try {
   221             long root = 0;
   221             long root = 0;
   222             long event_mask = 0;
   222             long event_mask = 0;
   223             XWindowAttributes wattr = new XWindowAttributes();
   223             XWindowAttributes wattr = new XWindowAttributes();
   224             try {
   224             try {
   225                 XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler);
   225                 XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance());
   226                 int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
   226                 int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
   227                                                               embedder, wattr.pData);
   227                                                               embedder, wattr.pData);
   228                 XToolkit.RESTORE_XERROR_HANDLER();
   228                 XToolkit.RESTORE_XERROR_HANDLER();
   229 
   229 
   230                 if (status == 0 ||
   230                 if (status == 0 ||
   238             } finally {
   238             } finally {
   239                 wattr.dispose();
   239                 wattr.dispose();
   240             }
   240             }
   241 
   241 
   242             if ((event_mask & XConstants.PropertyChangeMask) == 0) {
   242             if ((event_mask & XConstants.PropertyChangeMask) == 0) {
   243                 XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler);
   243                 XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance());
   244                 XlibWrapper.XSelectInput(XToolkit.getDisplay(), embedder,
   244                 XlibWrapper.XSelectInput(XToolkit.getDisplay(), embedder,
   245                                          event_mask | XConstants.PropertyChangeMask);
   245                                          event_mask | XConstants.PropertyChangeMask);
   246                 XToolkit.RESTORE_XERROR_HANDLER();
   246                 XToolkit.RESTORE_XERROR_HANDLER();
   247 
   247 
   248                 if (XToolkit.saved_error != null &&
   248                 if (XToolkit.saved_error != null &&
   392 
   392 
   393             long event_mask = entry.getEventMask();
   393             long event_mask = entry.getEventMask();
   394 
   394 
   395             /* Restore the original event mask for the embedder. */
   395             /* Restore the original event mask for the embedder. */
   396             if ((event_mask & XConstants.PropertyChangeMask) == 0) {
   396             if ((event_mask & XConstants.PropertyChangeMask) == 0) {
   397                 XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler);
   397                 XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance());
   398                 XlibWrapper.XSelectInput(XToolkit.getDisplay(), embedder,
   398                 XlibWrapper.XSelectInput(XToolkit.getDisplay(), embedder,
   399                                          event_mask);
   399                                          event_mask);
   400                 XToolkit.RESTORE_XERROR_HANDLER();
   400                 XToolkit.RESTORE_XERROR_HANDLER();
   401 
   401 
   402                 if (XToolkit.saved_error != null &&
   402                 if (XToolkit.saved_error != null &&