SHA256
1
0
forked from pool/tigervnc
tigervnc/U_viewer-reset-ctrl-alt-to-menu-state-on-focus.patch
Stefan Dirsch 478a217a95 - tigervnc-1.9.0-199-005db35
* update to current git master in order to fix boo#1132901
>>>>>>> ./tigervnc.changes.r85a118aa653f1d42c31302a788064076

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=161
2019-04-20 09:56:35 +00:00

30 lines
974 B
Diff

From 9f83180219380c690fb743182308bc2d534b8b1b Mon Sep 17 00:00:00 2001
From: Dominique Martinet <asmadeus@codewreck.org>
Date: Sun, 8 Jul 2018 02:15:43 +0900
Subject: [PATCH] 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.
---
vncviewer/Viewport.cxx | 6 ++++++
1 file changed, 6 insertions(+)
Index: b/vncviewer/Viewport.cxx
===================================================================
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -655,6 +655,12 @@ int Viewport::handle(int event)
if (menuAltKey)
handleKeyPress(0x38, XK_Alt_L);
+ // 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;