[pve-devel] r5389 - vncterm/pve2
svn-commits at proxmox.com
svn-commits at proxmox.com
Tue Jan 18 15:15:32 CET 2011
Author: dietmar
Date: 2011-01-18 15:15:32 +0100 (Tue, 18 Jan 2011)
New Revision: 5389
Removed:
vncterm/pve2/vncviewer.diff
Modified:
vncterm/pve2/Makefile
Log:
final cleanups
Modified: vncterm/pve2/Makefile
===================================================================
--- vncterm/pve2/Makefile 2011-01-18 14:12:58 UTC (rev 5388)
+++ vncterm/pve2/Makefile 2011-01-18 14:15:32 UTC (rev 5389)
@@ -72,7 +72,6 @@
install -m 0644 copyright dest/usr/share/doc/${PACKAGE}
install -m 0644 vncterm.1 dest/usr/share/man/man1
install -m 0644 debian/changelog.Debian dest/usr/share/doc/${PACKAGE}
-
gzip --best dest/usr/share/man/*/*
gzip --best dest/usr/share/doc/${PACKAGE}/changelog.Debian
dpkg-deb --build dest
@@ -82,10 +81,11 @@
.PHONY: clean
clean:
- rm -rf vncterm vncterm.1 vncterm_*.deb vnc_javasrc *~ vncterm-*.tar.gz glyphs.h
+ rm -rf vncterm vncterm.1 vncterm_*.deb tigervnc *~ vncterm-*.tar.gz glyphs.h
.PHONY: distclean
distclean: clean
+ rm -rf tigervnc.org
.PHONY: dist
${SNAP} dist: distclean
Deleted: vncterm/pve2/vncviewer.diff
===================================================================
--- vncterm/pve2/vncviewer.diff 2011-01-18 14:12:58 UTC (rev 5388)
+++ vncterm/pve2/vncviewer.diff 2011-01-18 14:15:32 UTC (rev 5389)
@@ -1,391 +0,0 @@
---- vnc_javasrc/RfbProto.java.orig 2007-04-27 04:36:00.000000000 +0200
-+++ vnc_javasrc/RfbProto.java 2008-02-14 10:02:36.000000000 +0100
-@@ -1048,136 +1048,102 @@ class RfbProto {
-
- void writeKeyEvent(KeyEvent evt) throws IOException {
-
-- int keyChar = evt.getKeyChar();
-+ int mods = evt.getModifiers();
-
-- //
-- // Ignore event if only modifiers were pressed.
-- //
--
-- // Some JVMs return 0 instead of CHAR_UNDEFINED in getKeyChar().
-- if (keyChar == 0)
-- keyChar = KeyEvent.CHAR_UNDEFINED;
--
-- if (keyChar == KeyEvent.CHAR_UNDEFINED) {
-- int code = evt.getKeyCode();
-- if (code == KeyEvent.VK_CONTROL || code == KeyEvent.VK_SHIFT ||
-- code == KeyEvent.VK_META || code == KeyEvent.VK_ALT)
-- return;
-- }
--
-- //
-- // Key press or key release?
-- //
--
-- boolean down = (evt.getID() == KeyEvent.KEY_PRESSED);
--
-- int key;
-- if (evt.isActionKey()) {
--
-- //
-- // An action key should be one of the following.
-- // If not then just ignore the event.
-- //
--
-- switch(evt.getKeyCode()) {
-- case KeyEvent.VK_HOME: key = 0xff50; break;
-- case KeyEvent.VK_LEFT: key = 0xff51; break;
-- case KeyEvent.VK_UP: key = 0xff52; break;
-- case KeyEvent.VK_RIGHT: key = 0xff53; break;
-- case KeyEvent.VK_DOWN: key = 0xff54; break;
-- case KeyEvent.VK_PAGE_UP: key = 0xff55; break;
-- case KeyEvent.VK_PAGE_DOWN: key = 0xff56; break;
-- case KeyEvent.VK_END: key = 0xff57; break;
-- case KeyEvent.VK_INSERT: key = 0xff63; break;
-- case KeyEvent.VK_F1: key = 0xffbe; break;
-- case KeyEvent.VK_F2: key = 0xffbf; break;
-- case KeyEvent.VK_F3: key = 0xffc0; break;
-- case KeyEvent.VK_F4: key = 0xffc1; break;
-- case KeyEvent.VK_F5: key = 0xffc2; break;
-- case KeyEvent.VK_F6: key = 0xffc3; break;
-- case KeyEvent.VK_F7: key = 0xffc4; break;
-- case KeyEvent.VK_F8: key = 0xffc5; break;
-- case KeyEvent.VK_F9: key = 0xffc6; break;
-- case KeyEvent.VK_F10: key = 0xffc7; break;
-- case KeyEvent.VK_F11: key = 0xffc8; break;
-- case KeyEvent.VK_F12: key = 0xffc9; break;
-- default:
-- return;
-- }
-+ // System.err.println ("TEST" + evt + "MOD " + mods);
-
-- } else {
-+ int keyChar = evt.getKeyChar();
-
-- //
-- // A "normal" key press. Ordinary ASCII characters go straight through.
-- // For CTRL-<letter>, CTRL is sent separately so just send <letter>.
-- // Backspace, tab, return, escape and delete have special keysyms.
-- // Anything else we ignore.
-- //
--
-- key = keyChar;
--
-- if (key < 0x20) {
-- if (evt.isControlDown()) {
-- key += 0x60;
-- } else {
-- switch(key) {
-- case KeyEvent.VK_BACK_SPACE: key = 0xff08; break;
-- case KeyEvent.VK_TAB: key = 0xff09; break;
-- case KeyEvent.VK_ENTER: key = 0xff0d; break;
-- case KeyEvent.VK_ESCAPE: key = 0xff1b; break;
-- }
-- }
-- } else if (key == 0x7f) {
-- // Delete
-- key = 0xffff;
-- } else if (key > 0xff) {
-- // JDK1.1 on X incorrectly passes some keysyms straight through,
-- // so we do too. JDK1.1.4 seems to have fixed this.
-- // The keysyms passed are 0xff00 .. XK_BackSpace .. XK_Delete
-- // Also, we pass through foreign currency keysyms (0x20a0..0x20af).
-- if ((key < 0xff00 || key > 0xffff) &&
-- !(key >= 0x20a0 && key <= 0x20af))
-- return;
-+ // Some JVMs return 0 instead of CHAR_UNDEFINED in getKeyChar().
-+ if (keyChar == 0)
-+ keyChar = KeyEvent.CHAR_UNDEFINED;
-+
-+ eventBufLen = 0;
-+
-+ writeModifierKeyEvents (mods);
-+
-+ int key = keyChar;
-+
-+ if (evt.getID() == KeyEvent.KEY_TYPED) {
-+
-+ if (key < 0x20) {
-+ if (evt.isControlDown()) {
-+ key += 0x60;
-+ } else {
-+ switch(key) {
-+ case KeyEvent.VK_BACK_SPACE: key = 0xff08; break;
-+ case KeyEvent.VK_TAB: key = 0xff09; break;
-+ case KeyEvent.VK_ENTER: key = 0xff0d; break;
-+ case KeyEvent.VK_ESCAPE: key = 0xff1b; break;
-+ }
-+ }
-+ } else if (key == 0x7f) {
-+ // Delete
-+ key = 0xffff;
-+ } else if (key > 0xff) {
-+ // JDK1.1 on X incorrectly passes some keysyms straight through,
-+ // so we do too. JDK1.1.4 seems to have fixed this.
-+ // The keysyms passed are 0xff00 .. XK_BackSpace .. XK_Delete
-+ // Also, we pass through foreign currency keysyms (0x20a0..0x20af).
-+ if ((key < 0xff00 || key > 0xffff) &&
-+ !(key >= 0x20a0 && key <= 0x20af))
-+ return;
-+ }
-+
-+ writeKeyEvent(key, true);
-+ writeKeyEvent(key, false); // simulate RELEASE
-+
-+ } else {
-+
-+ if (evt.isActionKey()) {
-+
-+ //
-+ // An action key should be one of the following.
-+ // If not then just ignore the event.
-+ //
-+ switch(evt.getKeyCode()) {
-+ case KeyEvent.VK_HOME: key = 0xff50; break;
-+ case KeyEvent.VK_LEFT: key = 0xff51; break;
-+ case KeyEvent.VK_UP: key = 0xff52; break;
-+ case KeyEvent.VK_RIGHT: key = 0xff53; break;
-+ case KeyEvent.VK_DOWN: key = 0xff54; break;
-+ case KeyEvent.VK_PAGE_UP: key = 0xff55; break;
-+ case KeyEvent.VK_PAGE_DOWN: key = 0xff56; break;
-+ case KeyEvent.VK_END: key = 0xff57; break;
-+ case KeyEvent.VK_INSERT: key = 0xff63; break;
-+ case KeyEvent.VK_F1: key = 0xffbe; break;
-+ case KeyEvent.VK_F2: key = 0xffbf; break;
-+ case KeyEvent.VK_F3: key = 0xffc0; break;
-+ case KeyEvent.VK_F4: key = 0xffc1; break;
-+ case KeyEvent.VK_F5: key = 0xffc2; break;
-+ case KeyEvent.VK_F6: key = 0xffc3; break;
-+ case KeyEvent.VK_F7: key = 0xffc4; break;
-+ case KeyEvent.VK_F8: key = 0xffc5; break;
-+ case KeyEvent.VK_F9: key = 0xffc6; break;
-+ case KeyEvent.VK_F10: key = 0xffc7; break;
-+ case KeyEvent.VK_F11: key = 0xffc8; break;
-+ case KeyEvent.VK_F12: key = 0xffc9; break;
-+ default:
-+ return;
-+ }
-+ writeKeyEvent(key, evt.getID() == KeyEvent.KEY_PRESSED);
-+ }
- }
-- }
-
-- // Fake keyPresses for keys that only generates keyRelease events
-- if ((key == 0xe5) || (key == 0xc5) || // XK_aring / XK_Aring
-- (key == 0xe4) || (key == 0xc4) || // XK_adiaeresis / XK_Adiaeresis
-- (key == 0xf6) || (key == 0xd6) || // XK_odiaeresis / XK_Odiaeresis
-- (key == 0xa7) || (key == 0xbd) || // XK_section / XK_onehalf
-- (key == 0xa3)) { // XK_sterling
-- // Make sure we do not send keypress events twice on platforms
-- // with correct JVMs (those that actually report KeyPress for all
-- // keys)
-- if (down)
-- brokenKeyPressed = true;
--
-- if (!down && !brokenKeyPressed) {
-- // We've got a release event for this key, but haven't received
-- // a press. Fake it.
-- eventBufLen = 0;
-- writeModifierKeyEvents(evt.getModifiers());
-- writeKeyEvent(key, true);
-- os.write(eventBuf, 0, eventBufLen);
-- }
-+ os.write(eventBuf, 0, eventBufLen);
-+ }
-
-- if (!down)
-- brokenKeyPressed = false;
-- }
-+ void writeCtrlAltDelete() throws IOException {
-
-- eventBufLen = 0;
-- writeModifierKeyEvents(evt.getModifiers());
-- writeKeyEvent(key, down);
--
-- // Always release all modifiers after an "up" event
-- if (!down)
-- writeModifierKeyEvents(0);
-+ writeKeyEvent(0xffe3, true);
-+ writeKeyEvent(0xffe9, true);
-+ writeKeyEvent(0xffff, true);
-+ writeKeyEvent(0xffff, false);
-+ writeKeyEvent(0xffe9, false);
-+ writeKeyEvent(0xffe3, false);
-
-- os.write(eventBuf, 0, eventBufLen);
-+ os.write(eventBuf, 0, eventBufLen);
- }
--
--
- //
- // Add a raw key event with the given X keysym to eventBuf.
- //
---- vnc_javasrc/ClipboardFrame.java.orig 2002-01-11 19:36:25.000000000 +0100
-+++ vnc_javasrc/ClipboardFrame.java 2008-02-14 09:56:35.000000000 +0100
-@@ -24,6 +24,8 @@
-
- import java.awt.*;
- import java.awt.event.*;
-+import java.awt.datatransfer.Clipboard;
-+import java.awt.datatransfer.StringSelection;
-
- class ClipboardFrame extends Frame
- implements WindowListener, ActionListener {
-@@ -33,6 +35,24 @@ class ClipboardFrame extends Frame
- String selection;
- VncViewer viewer;
-
-+ static Clipboard systemClipboard;
-+ static {
-+ // clipboard access is only allowed with signed applets
-+ try {
-+ // first try to get the Unix primary selection (fails on windows)
-+ systemClipboard = Toolkit.getDefaultToolkit().getSystemSelection();
-+ if (systemClipboard == null) {
-+ systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
-+ }
-+
-+ if (systemClipboard == null)
-+ System.out.println("Unable to get system Clipboard");
-+
-+ } catch (Exception e) {
-+ System.out.println("Unable to get system Clipboard: " + e.getMessage());
-+ }
-+ }
-+
- //
- // Constructor.
- //
-@@ -85,6 +105,10 @@ class ClipboardFrame extends Frame
- if (isVisible()) {
- textArea.selectAll();
- }
-+ if (systemClipboard != null) {
-+ StringSelection ss = new StringSelection(selection);
-+ systemClipboard.setContents(ss, ss);
-+ }
- }
-
-
---- vnc_javasrc/VncViewer.java.orig 2007-04-27 04:36:00.000000000 +0200
-+++ vnc_javasrc/VncViewer.java 2008-02-14 09:56:35.000000000 +0100
-@@ -36,6 +36,11 @@ public class VncViewer extends java.appl
- boolean inAnApplet = true;
- boolean inSeparateFrame = false;
-
-+ static public void disableFocusTraversal (Container con) {
-+ con.setFocusTraversalKeysEnabled (false);
-+ con.setFocusCycleRoot(true);
-+ }
-+
- //
- // main() is called when run as a java program from the command line.
- // It simply runs the applet inside a newly-created frame.
-@@ -126,6 +131,8 @@ public class VncViewer extends java.appl
- if (inSeparateFrame)
- vncFrame.addWindowListener(this);
-
-+ disableFocusTraversal (this);
-+
- rfbThread = new Thread(this);
- rfbThread.start();
- }
---- vnc_javasrc/Makefile.orig 2007-02-06 05:08:39.000000000 +0100
-+++ vnc_javasrc/Makefile 2008-02-14 09:56:35.000000000 +0100
-@@ -4,7 +4,7 @@
-
- CP = cp
- JC = javac
--JCFLAGS = -target 1.1 -source 1.2
-+JCFLAGS = -target 1.5 -source 1.2
- JAR = jar
- ARCHIVE = VncViewer.jar
- MANIFEST = MANIFEST.MF
---- vnc_javasrc/VncCanvas.java.orig 2007-04-27 04:36:00.000000000 +0200
-+++ vnc_javasrc/VncCanvas.java 2008-02-14 09:56:35.000000000 +0100
-@@ -27,7 +27,8 @@ import java.awt.image.*;
- import java.io.*;
- import java.lang.*;
- import java.util.zip.*;
--
-+import java.awt.datatransfer.DataFlavor;
-+import java.awt.datatransfer.Transferable;
-
- //
- // VncCanvas is a subclass of Canvas which draws a VNC desktop on it.
-@@ -1477,7 +1478,8 @@ class VncCanvas extends Canvas
- processLocalKeyEvent(evt);
- }
- public void keyTyped(KeyEvent evt) {
-- evt.consume();
-+ processLocalKeyEvent(evt);
-+ //evt.consume();
- }
-
- public void mousePressed(MouseEvent evt) {
-@@ -1544,12 +1546,35 @@ class VncCanvas extends Canvas
- }
- }
-
-+ String oldClipBoard = "";
-+
-+ public void mouseEntered(MouseEvent evt) {
-+
-+ if (ClipboardFrame.systemClipboard == null)
-+ return;
-+
-+ Transferable t = ClipboardFrame.systemClipboard.getContents(this);
-+
-+ if (t == null) return;
-+
-+ try {
-+ String data = (String)t.getTransferData(DataFlavor.stringFlavor);
-+
-+ if (data != null && !data.equals(oldClipBoard)) {
-+ rfb.writeClientCutText (data);
-+ oldClipBoard = data;
-+ viewer.clipboard.setCutText (data);
-+ }
-+
-+ } catch (Exception e) {
-+ }
-+ }
-+
- //
- // Ignored events.
- //
-
- public void mouseClicked(MouseEvent evt) {}
-- public void mouseEntered(MouseEvent evt) {}
- public void mouseExited(MouseEvent evt) {}
-
-
---- vnc_javasrc/ButtonPanel.java.orig 2002-07-03 12:49:59.000000000 +0200
-+++ vnc_javasrc/ButtonPanel.java 2008-02-14 10:04:25.000000000 +0100
-@@ -127,20 +127,11 @@ class ButtonPanel extends Panel implemen
-
- } else if (evt.getSource() == ctrlAltDelButton) {
- try {
-- final int modifiers = InputEvent.CTRL_MASK | InputEvent.ALT_MASK;
--
-- KeyEvent ctrlAltDelEvent =
-- new KeyEvent(this, KeyEvent.KEY_PRESSED, 0, modifiers, 127);
-- viewer.rfb.writeKeyEvent(ctrlAltDelEvent);
--
-- ctrlAltDelEvent =
-- new KeyEvent(this, KeyEvent.KEY_RELEASED, 0, modifiers, 127);
-- viewer.rfb.writeKeyEvent(ctrlAltDelEvent);
--
-+ viewer.rfb.writeCtrlAltDelete();
- } catch (IOException e) {
- e.printStackTrace();
- }
-- } else if (evt.getSource() == refreshButton) {
-+ } else if (evt.getSource() == refreshButton) {
- try {
- RfbProto rfb = viewer.rfb;
- rfb.writeFramebufferUpdateRequest(0, 0, rfb.framebufferWidth,
More information about the pve-devel
mailing list