5
0
mirror of git://git.proxmox.com/git/vncterm.git synced 2024-12-22 21:33:49 +03:00
vncterm/tigerpatches/export-ctrl-alt-delete.patch
2011-08-23 07:52:28 +02:00

44 lines
1.1 KiB
Diff

Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
===================================================================
--- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-25 07:44:23.000000000 +0100
+++ new/java/src/com/tigervnc/vncviewer/VncViewer.java 2011-01-28 13:26:16.000000000 +0100
@@ -466,6 +466,38 @@
}
}
+ public void sendRefreshRequest()
+ {
+ if (rfb == null)
+ return;
+
+ try {
+ rfb.writeFramebufferUpdateRequest(0, 0, rfb.framebufferWidth,
+ rfb.framebufferHeight, false);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void sendCtrlAltDel()
+ {
+ if (rfb == null)
+ return;
+
+ 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.