# Patch pulled from upstream to fix bug ID: #778650 Thanks Petr for the patch.
tags 778650 patch
--- 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; }