build: use temp file for glyph.h
[vncterm.git] / tigerpatches / export-ctrl-alt-delete.patch
1 Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
2 ===================================================================
3 --- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java     2011-01-25 07:44:23.000000000 +0100
4 +++ new/java/src/com/tigervnc/vncviewer/VncViewer.java  2011-01-28 13:26:16.000000000 +0100
5 @@ -466,6 +466,38 @@
6      }
7    }
8  
9 +  public void sendRefreshRequest()
10 +  {
11 +    if (rfb == null)
12 +      return;
13 +
14 +    try {
15 +      rfb.writeFramebufferUpdateRequest(0, 0, rfb.framebufferWidth,
16 +                                       rfb.framebufferHeight, false);
17 +    } catch (IOException e) {
18 +      e.printStackTrace();
19 +    }
20 +  }
21 +
22 +  public void sendCtrlAltDel()
23 +  {
24 +    if (rfb == null)
25 +      return;
26 +
27 +    int modifiers = InputEvent.CTRL_MASK | InputEvent.ALT_MASK;
28 +
29 +    try {
30 +      KeyEvent ctrlAltDelEvent =
31 +       new KeyEvent(this, KeyEvent.KEY_PRESSED, 0, modifiers, 127);
32 +      rfb.writeKeyEvent(ctrlAltDelEvent);
33 +
34 +      ctrlAltDelEvent =
35 +       new KeyEvent(this, KeyEvent.KEY_RELEASED, 0, modifiers, 127);
36 +      rfb.writeKeyEvent(ctrlAltDelEvent);
37 +    } catch (IOException e) {
38 +      e.printStackTrace();
39 +    }
40 +  }
41  
42    //
43    // Show an authentication panel.