Example #1
0
 void embedChild(long child) {
   if (xembed.handle != 0) {
     detachChild();
   }
   xembed.handle = child;
   initDispatching();
 }
Example #2
0
 void detachChild() {
   if (xembedLog.isLoggable(PlatformLogger.FINE))
     xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
   /**
    * XEmbed specification: "The embedder can unmap the client and reparent the client window to
    * the root window. If the client receives an ReparentNotify event, it should check the parent
    * field of the XReparentEvent structure. If this is the root window of the window's screen,
    * then the protocol is finished and there is no further interaction. If it is a window other
    * than the root window, then the protocol continues with the new parent acting as the embedder
    * window."
    */
   XToolkit.awtLock();
   try {
     XlibWrapper.XUnmapWindow(XToolkit.getDisplay(), xembed.handle);
     XlibWrapper.XReparentWindow(
         XToolkit.getDisplay(), xembed.handle, XToolkit.getDefaultRootWindow(), 0, 0);
   } finally {
     XToolkit.awtUnlock();
   }
   endDispatching();
   xembed.handle = 0;
 }
Example #3
0
 void childDestroyed() {
   xembedLog.fine("Child " + Long.toHexString(xembed.handle) + " has self-destroyed.");
   endDispatching();
   xembed.handle = 0;
 }