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

Print this page




  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(Level.FINE)) xembedLog.fine(msg.toString());
  99         if (msg.get_message_type() == XEmbed.getAtom()) {
 100             if (xembedLog.isLoggable(Level.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                   }
 121                   break;
 122               case XEMBED_FOCUS_IN: // We got focus!
 123                   // Check for direction
 124                   handleFocusIn((int)msg.get_data(2));
 125                   break;
 126               case XEMBED_FOCUS_OUT:
 127                   if (applicationActive) {
 128                       handleWindowFocusOut();




  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(Level.FINE)) xembedLog.fine(msg.toString());
  99         if (msg.get_message_type() == XEmbed.getAtom()) {
 100             if (xembedLog.isLoggable(Level.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.isParented()) {
 108                       embedded.setNativeParent(server);
 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                   }
 121                   break;
 122               case XEMBED_FOCUS_IN: // We got focus!
 123                   // Check for direction
 124                   handleFocusIn((int)msg.get_data(2));
 125                   break;
 126               case XEMBED_FOCUS_OUT:
 127                   if (applicationActive) {
 128                       handleWindowFocusOut();