Commit 57e63eb3 authored by Mike Gabriel's avatar Mike Gabriel

debian/patches: Add...

debian/patches: Add 0005_release-keys-when-xfreerdp-is-unfocused-to-prevent-s.patch. Prevent Alt key from getting "stuck" with -grab-keyboard option when using Alt-Tab to switch between local X windows. Thanks to Petr Vorel <petr.vorel@gmail.com> for providing the patch. (Closes: #778650).
parent d7054256
>From ffa7f0363fa4f0770d0f1ac451d7a5e87d415d7b Mon Sep 17 00:00:00 2001
From: Seray Rosh <seray.rosh@web.de>
Date: Fri, 27 Feb 2015 16:02:40 +0100
Subject: [PATCH] fix #778650: release keys when xfreerdp is unfocused to prevent stuck keys
This fixes https://bugs.debian.org/778650
Originated from https://github.com/FreeRDP/FreeRDP/pull/2430
Cherry picked from upstream commit ffa7f0363fa4f0770d0f1ac451d7a5e87d415d7b, ported for debian/1.1.0~git20140921.1.440916e+dfsg1-5
---
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
client/X11/xf_event.c | 1 +
client/X11/xf_keyboard.c | 6 ++++++
2 files changed, 7 insertions(+)
--- a/client/X11/xf_event.c
+++ b/client/X11/xf_event.c
@@ -456,6 +456,7 @@
if (event->xfocus.mode == NotifyWhileGrabbed)
XUngrabKeyboard(xfc->display, CurrentTime);
+ xf_kbd_release_all_keypress(xfc);
xf_kbd_clear(xfc);
if (app)
--- a/client/X11/xf_keyboard.c
+++ b/client/X11/xf_keyboard.c
@@ -75,6 +75,12 @@
if (xfc->pressed_keys[keycode] != NoSymbol)
{
rdp_scancode = freerdp_keyboard_get_rdp_scancode_from_x11_keycode(keycode);
+
+ // release tab before releasing the windows key.
+ // this stops the start menu from opening on unfocus event.
+ if (rdp_scancode == RDP_SCANCODE_LWIN)
+ freerdp_input_send_keyboard_event_ex(xfc->instance->input, FALSE, RDP_SCANCODE_TAB);
+
freerdp_input_send_keyboard_event_ex(xfc->instance->input, FALSE, rdp_scancode);
xfc->pressed_keys[keycode] = NoSymbol;
}
......@@ -14,3 +14,4 @@
0004_build-cmake-3.1-compatibility.patch
1010_libudev-link.patch
1011_ffmpeg-2.9.patch
0005_release-keys-when-xfreerdp-is-unfocused-to-prevent-s.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment