Пример #1
0
 public void handlePropertyNotify(XEvent xev) {
   if (isXEmbedActive()) {
     XPropertyEvent ev = xev.get_xproperty();
     if (xembedLog.isLoggable(PlatformLogger.FINER))
       xembedLog.finer("Property change on client: " + ev);
     if (ev.get_atom() == XAtom.XA_WM_NORMAL_HINTS) {
       childResized();
     } else if (ev.get_atom() == XEmbedInfo.getAtom()) {
       processXEmbedInfo();
     } else if (ev.get_atom() == XDnDConstants.XA_XdndAware.getAtom()) {
       XDropTargetRegistry.getRegistry().unregisterXEmbedClient(getWindow(), xembed.handle);
       if (ev.get_state() == XConstants.PropertyNewValue) {
         XDropTargetRegistry.getRegistry().registerXEmbedClient(getWindow(), xembed.handle);
       }
     }
   } else {
     xembedLog.finer("XEmbed is not active");
   }
 }
Пример #2
0
 void endDispatching() {
   xembedLog.fine("End dispatching for " + Long.toHexString(xembed.handle));
   XToolkit.awtLock();
   try {
     XDropTargetRegistry.getRegistry().unregisterXEmbedClient(getWindow(), xembed.handle);
     // We can't deselect input since someone else might be interested in it
     XToolkit.removeEventDispatcher(xembed.handle, xembed);
   } finally {
     XToolkit.awtUnlock();
   }
 }
Пример #3
0
  void initDispatching() {
    if (xembedLog.isLoggable(PlatformLogger.FINE))
      xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle));
    XToolkit.awtLock();
    try {
      XToolkit.addEventDispatcher(xembed.handle, xembed);
      XlibWrapper.XSelectInput(
          XToolkit.getDisplay(),
          xembed.handle,
          XConstants.StructureNotifyMask | XConstants.PropertyChangeMask);

      XDropTargetRegistry.getRegistry().registerXEmbedClient(getWindow(), xembed.handle);
    } finally {
      XToolkit.awtUnlock();
    }
    xembed.processXEmbedInfo();

    notifyChildEmbedded();
  }