Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dcommander committed Jan 11, 2025
2 parents d56933c + 368a786 commit fc41bd3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ sized, if multi-screen spanning was enabled, the scaled remote desktop was
larger than the viewer window, and "Displays have separate Spaces" was enabled
in the system settings.

6. The Windows TurboVNC Viewer now sends Alt-F4 keystrokes to the VNC server
if keyboard grabbing is enabled.


3.1.3
=====
Expand Down
6 changes: 2 additions & 4 deletions java/com/turbovnc/rfb/Helper.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ private static synchronized void printMissingFeatures() {
vlog.info(" - Keyboard grabbing");
if (Utils.osEID())
vlog.info(" - Extended input device support");
if (Utils.isX11()) {
if (Utils.isX11())
vlog.info(" - Multi-screen spanning in full-screen mode");
}
if (Utils.isMac()) {
if (Utils.isMac())
vlog.info(" - Multi-screen spanning");
}
if (Utils.isWindows())
vlog.info(" - Pageant support");
else
Expand Down
4 changes: 2 additions & 2 deletions java/com/turbovnc/rfb/Params.java
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,8 @@ public void save(String node) {
"\"Primary\" when in windowed mode and the same effect as \"All\" when in " +
"full-screen mode." +
(Utils.isX11() ? " Due to general issues with spanning windows across " +
"multiple monitors in X11, this parameter has no effect on Un*x/X11 " +
"platforms except in full-screen mode." : "") +
"multiple monitors in X11, this parameter has no effect on Un*x/X11 " +
"platforms except in full-screen mode." : "") +
(Utils.isMac() ? " This parameter has no effect on macOS unless " +
"\"Displays have separate Spaces\" is disabled in the system settings." :
""), SpanParameter.AUTO);
Expand Down
8 changes: 6 additions & 2 deletions java/com/turbovnc/vncviewer/DesktopWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ class DesktopWindow extends JPanel implements Runnable, MouseListener,
private final KeyEventDispatcher keyEventDispatcher =
new KeyEventDispatcher() {
public boolean dispatchKeyEvent(KeyEvent e) {
if ((e.getKeyCode() == 18 &&
if ((e.getKeyCode() == KeyEvent.VK_ALT &&
e.getKeyLocation() == KeyEvent.KEY_LOCATION_LEFT) ||
e.getKeyCode() == 121) {
e.getKeyCode() == KeyEvent.VK_F10 ||
// Also send Alt-F4 to the VNC server if the keyboard is grabbed.
(Utils.isWindows() && VncViewer.isKeyboardGrabbed(cc.viewport) &&
e.getKeyCode() == KeyEvent.VK_F4 &&
e.getModifiersEx() == KeyEvent.ALT_DOWN_MASK)) {
if (e.getID() == KeyEvent.KEY_PRESSED)
cc.desktop.keyPressed(e);
else if (e.getID() == KeyEvent.KEY_RELEASED)
Expand Down

0 comments on commit fc41bd3

Please sign in to comment.