Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java TurboVNC Viewer on Windows closes on Alt-F4 #434

Open
capi opened this issue Dec 8, 2024 · 5 comments
Open

Java TurboVNC Viewer on Windows closes on Alt-F4 #434

capi opened this issue Dec 8, 2024 · 5 comments

Comments

@capi
Copy link

capi commented Dec 8, 2024

When pressing Alt-F4 the key-codes are sent to the VNC server, but the viewer also closes. When re-connecting, I can see that the Alt-F4 has also been sent to the server.

This happens, regardless if I use "Grab Keyboard" or not, even in Full-Screen mode.

Please let me know if there are any more information I can provide.

@dcommander
Copy link
Member

Unfortunately Alt-F4 is intercepted by the operating system before our low-level keyboard hook can intercept it, so it isn't possible to grab that keystroke.

@dcommander dcommander closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2024
@capi
Copy link
Author

capi commented Dec 20, 2024

Ok, sad to hear. Normally is possible in Java Programs to prevent Alt-F4 to close the Window, in Swing it's normally done by intercepting the window-closing event (I don't know how it is handled here).

As I said: the key-stroke is recognized and then sent to the server, all that is missing is preventing the local Window from being closed, and that's normally possible in all the GUI frameworks around.

I'll stick with 2.2.x then for some time longer :-)

@dcommander
Copy link
Member

So the 2.2.x viewer (presumably the Windows native viewer) does not exhibit the issue? That's odd, since it used the same low-level keyboard hook.

@dcommander
Copy link
Member

As far as intercepting the window close event in Swing, it does look like there may be a way to tell it not to close the window, but I still want to understand why it works in TurboVNC 2.2.x. (The 2.2.x viewer code did nothing special in this regard.) I will do some more investigating.

@dcommander dcommander reopened this Dec 20, 2024
@capi
Copy link
Author

capi commented Dec 20, 2024

It works with the native viewer in 2.2.x, I'll need to double-check if it does with the Java version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants