viewer: reset ctrl / alt to menu state on focus
Setting Ctrl or Alt key on menu only sends the key press, and the
state is lost when focus is lost and recovered.
This checks the menu variable and sends the keys again if needed.
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 4e23dc8..317f06b 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -635,6 +635,12 @@
exit_vncviewer(e.str());
}
+ // Resend Ctrl/Alt if needed
+ if (menuCtrlKey)
+ handleKeyPress(0x1d, XK_Control_L);
+ if (menuAltKey)
+ handleKeyPress(0x38, XK_Alt_L);
+
// Yes, we would like some focus please!
return 1;