[pve-devel] r5386 - in vncterm/pve2: . tigerpatches

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Jan 18 14:23:36 CET 2011


Author: dietmar
Date: 2011-01-18 14:23:35 +0100 (Tue, 18 Jan 2011)
New Revision: 5386

Added:
   vncterm/pve2/tigerpatches/
   vncterm/pve2/tigerpatches/export-ctrl-alt-delete.patch
   vncterm/pve2/tigerpatches/javascript-events.patch
   vncterm/pve2/tigerpatches/series
Log:
patches for tigervnc


Added: vncterm/pve2/tigerpatches/export-ctrl-alt-delete.patch
===================================================================
--- vncterm/pve2/tigerpatches/export-ctrl-alt-delete.patch	                        (rev 0)
+++ vncterm/pve2/tigerpatches/export-ctrl-alt-delete.patch	2011-01-18 13:23:35 UTC (rev 5386)
@@ -0,0 +1,35 @@
+Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
+===================================================================
+--- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java	2011-01-18 14:19:59.000000000 +0100
++++ new/java/src/com/tigervnc/vncviewer/VncViewer.java	2011-01-18 14:19:59.000000000 +0100
+@@ -465,6 +465,30 @@
+   }
+ 
+ 
++  public void sendCtrlAltDel()
++  {
++    System.out.println("Send CtrlAltDel0");
++    if (rfb == null)
++	    return;
++
++    System.out.println("Send CtrlAltDel1");
++
++    int modifiers = InputEvent.CTRL_MASK | InputEvent.ALT_MASK;
++
++    try {
++	    KeyEvent ctrlAltDelEvent =
++		    new KeyEvent(this, KeyEvent.KEY_PRESSED, 0, modifiers, 127);
++	    rfb.writeKeyEvent(ctrlAltDelEvent);
++
++	    ctrlAltDelEvent =
++		    new KeyEvent(this, KeyEvent.KEY_RELEASED, 0, modifiers, 127);
++	    rfb.writeKeyEvent(ctrlAltDelEvent);
++    } catch (IOException e) {
++	    e.printStackTrace();
++    }
++
++  }
++
+   //
+   // Show an authentication panel.
+   //

Added: vncterm/pve2/tigerpatches/javascript-events.patch
===================================================================
--- vncterm/pve2/tigerpatches/javascript-events.patch	                        (rev 0)
+++ vncterm/pve2/tigerpatches/javascript-events.patch	2011-01-18 13:23:35 UTC (rev 5386)
@@ -0,0 +1,112 @@
+Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
+===================================================================
+--- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java	2011-01-18 14:14:34.000000000 +0100
++++ new/java/src/com/tigervnc/vncviewer/VncViewer.java	2011-01-18 14:20:35.000000000 +0100
+@@ -27,11 +27,15 @@
+ 
+ package com.tigervnc.vncviewer;
+ 
++import netscape.javascript.*;
+ import java.awt.*;
+ import java.awt.event.*;
+ import java.io.*;
+ import java.net.*;
+ 
++import java.awt.Graphics;
++import java.applet.Applet;
++
+ public class VncViewer extends java.applet.Applet
+   implements java.lang.Runnable, WindowListener, ComponentListener {
+ 
+@@ -91,6 +95,9 @@
+   int debugStatsExcludeUpdates;
+   int debugStatsMeasureUpdates;
+ 
++  JSObject jswin;
++  String myid;
++
+   // Reference to this applet for inter-applet communication.
+   public static java.applet.Applet refApplet;
+ 
+@@ -104,6 +111,9 @@
+ 
+     refApplet = this;
+ 
++    jswin = JSObject.getWindow(this);
++    myid = getParameter("id");
++
+     if (inSeparateFrame) {
+       vncFrame = new Frame("TigerVNC");
+       if (!inAnApplet) {
+@@ -134,6 +144,9 @@
+ 
+     rfbThread = new Thread(this);
+     rfbThread.start();
++
++    String[] myparam = { myid, "init"};
++    jswin.call("PVE_vnc_console_event", myparam);
+   }
+ 
+   public void update(Graphics g) {
+@@ -936,6 +949,8 @@
+ 
+     if (inAnApplet) {
+       showMessage("Disconnected");
++      String[] myparam = { myid, "disconnect"};
++      jswin.call("PVE_vnc_console_event", myparam);
+     } else {
+       System.exit(0);
+     }
+@@ -953,6 +968,8 @@
+       // vncContainer null, applet not inited,
+       // can not present the error to the user.
+       Thread.currentThread().stop();
++      String[] myparam = { myid, "error", str};
++      jswin.call("PVE_vnc_console_event", myparam);
+     } else {
+       System.exit(1);
+     }
+@@ -974,6 +991,8 @@
+       rfb.close();
+ 
+     if (inAnApplet) {
++      String[] myparam = { myid, "error", str};
++      jswin.call("PVE_vnc_console_event", myparam);
+       showMessage(str);
+     } else {
+       System.exit(1);
+@@ -1043,6 +1062,9 @@
+       rfb.close();
+     if (inSeparateFrame)
+       vncFrame.dispose();
++
++    String[] myparam = { myid, "destroy"};
++    jswin.call("PVE_vnc_console_event", myparam);
+   }
+ 
+   //
+@@ -1091,6 +1113,8 @@
+     if (!inAnApplet) {
+       System.exit(0);
+     }
++    String[] myparam = { myid, "close"};
++    jswin.call("PVE_vnc_console_event", myparam);
+   }
+ 
+   //
+Index: new/java/src/com/tigervnc/vncviewer/Makefile
+===================================================================
+--- new.orig/java/src/com/tigervnc/vncviewer/Makefile	2011-01-18 14:14:34.000000000 +0100
++++ new/java/src/com/tigervnc/vncviewer/Makefile	2011-01-18 14:20:56.000000000 +0100
+@@ -4,7 +4,10 @@
+ 
+ CP = cp
+ JC = javac
+-JCFLAGS = -target 1.5 -classpath ../../../
++# define java.ext.dirs, else plugin.jar (JSObject) is not found
++# is there a better way to include that?
++JCFLAGS = -target 1.5 -classpath ../../../ -Djava.ext.dirs=/usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/
++
+ JAR = jar
+ ARCHIVE = VncViewer.jar
+ MANIFEST = MANIFEST.MF

Added: vncterm/pve2/tigerpatches/series
===================================================================
--- vncterm/pve2/tigerpatches/series	                        (rev 0)
+++ vncterm/pve2/tigerpatches/series	2011-01-18 13:23:35 UTC (rev 5386)
@@ -0,0 +1,2 @@
+javascript-events.patch
+export-ctrl-alt-delete.patch




More information about the pve-devel mailing list