diff options
Diffstat (limited to 'classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch')
-rw-r--r-- | classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch | 123 |
1 files changed, 110 insertions, 13 deletions
diff --git a/classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch b/classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch index 224d825..3309860 100644 --- a/classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch +++ b/classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch @@ -1685,7 +1685,7 @@ diff -Naur JavaViewer.orig/OptionsFrame.java JavaViewer/OptionsFrame.java choices[shareDesktopIndex].select("Yes"); diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java --- JavaViewer.orig/RfbProto.java 2006-05-24 15:14:40.000000000 -0400 -+++ JavaViewer/RfbProto.java 2010-03-27 17:59:56.000000000 -0400 ++++ JavaViewer/RfbProto.java 2010-11-30 22:13:58.000000000 -0500 @@ -31,6 +31,7 @@ import java.net.Socket; import java.util.*; @@ -2662,7 +2662,45 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java os.write(b); // } -@@ -1610,6 +1971,21 @@ +@@ -1506,6 +1867,37 @@ + final static int META_MASK = InputEvent.META_MASK; + final static int ALT_MASK = InputEvent.ALT_MASK; + ++ void writeWheelEvent(MouseWheelEvent evt) throws IOException { ++ eventBufLen = 0; ++ ++ int x = evt.getX(); ++ int y = evt.getY(); ++ ++ if (x < 0) x = 0; ++ if (y < 0) y = 0; ++ ++ int ptrmask; ++ ++ int clicks = evt.getWheelRotation(); ++ System.out.println("writeWheelEvent: clicks: " + clicks); ++ if (clicks > 0) { ++ ptrmask = 16; ++ } else if (clicks < 0) { ++ ptrmask = 8; ++ } else { ++ return; ++ } ++ ++ eventBuf[eventBufLen++] = (byte) PointerEvent; ++ eventBuf[eventBufLen++] = (byte) ptrmask; ++ eventBuf[eventBufLen++] = (byte) ((x >> 8) & 0xff); ++ eventBuf[eventBufLen++] = (byte) (x & 0xff); ++ eventBuf[eventBufLen++] = (byte) ((y >> 8) & 0xff); ++ eventBuf[eventBufLen++] = (byte) (y & 0xff); ++ ++ os.write(eventBuf, 0, eventBufLen); ++ } ++ + // + // Write a pointer event message. We may need to send modifier key events + // around it to set the correct modifier state. +@@ -1610,6 +2002,21 @@ boolean down = (evt.getID() == KeyEvent.KEY_PRESSED); @@ -2684,7 +2722,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java int key; if (evt.isActionKey()) { -@@ -1685,6 +2061,9 @@ +@@ -1685,6 +2092,9 @@ default : return; } @@ -2694,7 +2732,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } else { -@@ -1794,6 +2173,16 @@ +@@ -1794,6 +2204,16 @@ int oldModifiers = 0; void writeModifierKeyEvents(int newModifiers) { @@ -4784,18 +4822,31 @@ diff -Naur JavaViewer.orig/SSLSocketToMe.java JavaViewer/SSLSocketToMe.java +} diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java --- JavaViewer.orig/VncCanvas.java 2005-11-21 18:50:18.000000000 -0500 -+++ JavaViewer/VncCanvas.java 2007-05-31 15:33:20.000000000 -0400 -@@ -27,6 +27,9 @@ ++++ JavaViewer/VncCanvas.java 2010-11-30 22:57:50.000000000 -0500 +@@ -27,6 +27,13 @@ import java.lang.*; import java.util.zip.*; +// begin runge/x11vnc +import java.util.Collections; +// end runge/x11vnc ++ ++// begin runge/x11vnc ++// all the MouseWheel stuff below. ++// end runge/x11vnc // // VncCanvas is a subclass of Canvas which draws a VNC desktop on it. -@@ -85,6 +88,22 @@ +@@ -34,7 +41,7 @@ + + class VncCanvas + extends Canvas +- implements KeyListener, MouseListener, MouseMotionListener { ++ implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener { + + VncViewer viewer; + RfbProto rfb; +@@ -85,6 +92,22 @@ cm24 = new DirectColorModel(24, 0xFF0000, 0x00FF00, 0x0000FF); @@ -4818,7 +4869,23 @@ diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java colors = new Color[256]; // sf@2005 - Now Default for (int i = 0; i < 256; i++) -@@ -202,6 +221,9 @@ +@@ -186,6 +209,7 @@ + inputEnabled = true; + addMouseListener(this); + addMouseMotionListener(this); ++ addMouseWheelListener(this); + if (viewer.showControls) { + viewer.buttonPanel.enableRemoteAccessControls(true); + } +@@ -193,6 +217,7 @@ + inputEnabled = false; + removeMouseListener(this); + removeMouseMotionListener(this); ++ removeMouseWheelListener(this); + if (viewer.showControls) { + viewer.buttonPanel.enableRemoteAccessControls(false); + } +@@ -202,6 +227,9 @@ public void setPixelFormat() throws IOException { // sf@2005 - Adding more color modes @@ -4828,7 +4895,7 @@ diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java if (viewer.options.eightBitColors > 0) { viewer.options.oldEightBitColors = viewer.options.eightBitColors; -@@ -237,6 +259,9 @@ +@@ -237,6 +265,9 @@ } else { @@ -4838,7 +4905,7 @@ diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java rfb.writeSetPixelFormat( 32, 24, -@@ -376,12 +401,14 @@ +@@ -376,12 +407,14 @@ // Start/stop session recording if necessary. viewer.checkRecordingStatus(); @@ -4859,7 +4926,7 @@ diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java // // main dispatch loop -@@ -390,6 +417,9 @@ +@@ -390,6 +423,9 @@ while (true) { // Read message type from the server. int msgType = rfb.readServerMessageType(); @@ -4869,7 +4936,37 @@ diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java // Process the message depending on its type. switch (msgType) { -@@ -1532,9 +1562,14 @@ +@@ -1332,6 +1368,9 @@ + public void mouseDragged(MouseEvent evt) { + processLocalMouseEvent(evt, true); + } ++ public void mouseWheelMoved(MouseWheelEvent evt) { ++ processLocalMouseWheelEvent(evt); ++ } + + public void processLocalKeyEvent(KeyEvent evt) { + if (viewer.rfb != null && rfb.inNormalProtocol) { +@@ -1367,6 +1406,19 @@ + evt.consume(); + } + ++ public void processLocalMouseWheelEvent(MouseWheelEvent evt) { ++ if (viewer.rfb != null && rfb.inNormalProtocol) { ++ synchronized(rfb) { ++ try { ++ rfb.writeWheelEvent(evt); ++ } catch (Exception e) { ++ e.printStackTrace(); ++ } ++ rfb.notify(); ++ } ++ } ++ } ++ + public void processLocalMouseEvent(MouseEvent evt, boolean moved) { + if (viewer.rfb != null && rfb.inNormalProtocol) { + if (moved) { +@@ -1532,9 +1584,14 @@ else { result = @@ -4887,7 +4984,7 @@ diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java } } else { result = 0; // Transparent pixel -@@ -1565,9 +1600,14 @@ +@@ -1565,9 +1622,14 @@ else { result = |