Beispiel #1
0
 public void handleClientMessage(XEvent xev) {
   super.handleClientMessage(xev);
   XClientMessageEvent cl = xev.get_xclient();
   if ((wm_protocols != null) && (cl.get_message_type() == wm_protocols.getAtom())) {
     if (cl.get_data(0) == wm_delete_window.getAtom()) {
       handleQuit();
     } else if (cl.get_data(0) == wm_take_focus.getAtom()) {
       handleWmTakeFocus(cl);
     }
   } else if (cl.get_message_type() == resize_request.getAtom()) {
     reshape(
         (int) cl.get_data(0), (int) cl.get_data(1),
         (int) cl.get_data(2), (int) cl.get_data(3),
         (int) cl.get_data(4), true);
   }
 }
Beispiel #2
0
 private void handleWmTakeFocus(XClientMessageEvent cl) {
   if (focusLog.isLoggable(Level.FINE)) {
     focusLog.log(Level.FINE, "WM_TAKE_FOCUS on {0}", new Object[] {String.valueOf(this)});
   }
   requestWindowFocus(cl.get_data(1), true);
 }
Beispiel #3
0
 public void handleClientMessage(XEvent xev) {
   super.handleClientMessage(xev);
   XClientMessageEvent msg = xev.get_xclient();
   if (xembedLog.isLoggable(PlatformLogger.FINER))
     xembedLog.finer("Client message to embedder: " + msg);
   if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
     if (xembedLog.isLoggable(PlatformLogger.FINE))
       xembedLog.fine(xembed.XEmbedMessageToString(msg));
   }
   if (isXEmbedActive()) {
     switch ((int) msg.get_data(1)) {
       case XEMBED_REQUEST_FOCUS:
         requestXEmbedFocus();
         break;
       case XEMBED_FOCUS_NEXT:
         focusNext();
         break;
       case XEMBED_FOCUS_PREV:
         focusPrev();
         break;
       case XEMBED_REGISTER_ACCELERATOR:
         registerAccelerator(msg.get_data(2), msg.get_data(3), msg.get_data(4));
         break;
       case XEMBED_UNREGISTER_ACCELERATOR:
         unregisterAccelerator(msg.get_data(2));
         break;
       case NON_STANDARD_XEMBED_GTK_GRAB_KEY:
         grabKey(msg.get_data(3), msg.get_data(4));
         break;
       case NON_STANDARD_XEMBED_GTK_UNGRAB_KEY:
         ungrabKey(msg.get_data(3), msg.get_data(4));
         break;
     }
   } else {
     xembedLog.finer("But XEmbed is not Active!");
   }
 }
 public void handleClientMessage(XEvent xev) {
   if (eventLog.isLoggable(Level.FINER)) {
     XClientMessageEvent msg = xev.get_xclient();
     eventLog.finer(msg.toString());
   }
 }