src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java

Print this page




  78             unsafe.freeMemory(data);
  79         }
  80         // XEmbeddedFrame is initially created with a null parent..
  81         // Here it is reparented to the proper parent window.
  82         long parentWindow = embedded.getParentWindowHandle();
  83         if (parentWindow != 0) {
  84             XToolkit.awtLock();
  85             try {
  86                 XlibWrapper.XReparentWindow(XToolkit.getDisplay(),
  87                                             embedded.getWindow(),
  88                                             parentWindow,
  89                                             0, 0);
  90             } finally {
  91                 XToolkit.awtUnlock();
  92             }
  93         }
  94     }
  95 
  96     void handleClientMessage(XEvent xev) {
  97         XClientMessageEvent msg = xev.get_xclient();
  98         if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine(msg.toString());


  99         if (msg.get_message_type() == XEmbed.getAtom()) {
 100             if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));


 101             switch ((int)msg.get_data(1)) {
 102               case XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
 103                   active = true;
 104                   server = getEmbedder(embedded, msg);
 105                   // Check if window is reparented. If not - it was created with
 106                   // parent and so we should update it here.
 107                   if (!embedded.isReparented()) {
 108                       embedded.setReparented(true);
 109                       embedded.updateSizeHints();
 110                   }
 111                   embedded.notifyStarted();
 112                   break;
 113               case XEMBED_WINDOW_ACTIVATE:
 114                   applicationActive = true;
 115                   break;
 116               case XEMBED_WINDOW_DEACTIVATE:
 117                   if (applicationActive) {
 118                       applicationActive = false;
 119                       handleWindowFocusOut();
 120                   }




  78             unsafe.freeMemory(data);
  79         }
  80         // XEmbeddedFrame is initially created with a null parent..
  81         // Here it is reparented to the proper parent window.
  82         long parentWindow = embedded.getParentWindowHandle();
  83         if (parentWindow != 0) {
  84             XToolkit.awtLock();
  85             try {
  86                 XlibWrapper.XReparentWindow(XToolkit.getDisplay(),
  87                                             embedded.getWindow(),
  88                                             parentWindow,
  89                                             0, 0);
  90             } finally {
  91                 XToolkit.awtUnlock();
  92             }
  93         }
  94     }
  95 
  96     void handleClientMessage(XEvent xev) {
  97         XClientMessageEvent msg = xev.get_xclient();
  98         if (xembedLog.isLoggable(PlatformLogger.FINE)) {
  99             xembedLog.fine(msg.toString());
 100         }
 101         if (msg.get_message_type() == XEmbed.getAtom()) {
 102             if (xembedLog.isLoggable(PlatformLogger.FINE)) {
 103                 xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));
 104             }
 105             switch ((int)msg.get_data(1)) {
 106               case XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
 107                   active = true;
 108                   server = getEmbedder(embedded, msg);
 109                   // Check if window is reparented. If not - it was created with
 110                   // parent and so we should update it here.
 111                   if (!embedded.isReparented()) {
 112                       embedded.setReparented(true);
 113                       embedded.updateSizeHints();
 114                   }
 115                   embedded.notifyStarted();
 116                   break;
 117               case XEMBED_WINDOW_ACTIVATE:
 118                   applicationActive = true;
 119                   break;
 120               case XEMBED_WINDOW_DEACTIVATE:
 121                   if (applicationActive) {
 122                       applicationActive = false;
 123                       handleWindowFocusOut();
 124                   }