]> source.dussan.org Git - tigervnc.git/commitdiff
viewer: reset ctrl / alt to menu state on focus 674/head
authorDominique Martinet <asmadeus@codewreck.org>
Sat, 7 Jul 2018 17:15:43 +0000 (02:15 +0900)
committerDominique Martinet <asmadeus@codewreck.org>
Sat, 7 Jul 2018 17:17:30 +0000 (02:17 +0900)
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.

vncviewer/Viewport.cxx

index 4e23dc8c4beb2b48797049977059d1f7fbc29727..317f06b212dd8ac245c08a2425315875175501db 100644 (file)
@@ -635,6 +635,12 @@ int Viewport::handle(int event)
       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;