{"action":"closed","issue":{"url":"https://api.github.com/repos/FreeRDP/FreeRDP/issues/1010","repository_url":"https://api.github.com/repos/FreeRDP/FreeRDP","labels_url":"https://api.github.com/repos/FreeRDP/FreeRDP/issues/1010/labels{/name}","comments_url":"https://api.github.com/repos/FreeRDP/FreeRDP/issues/1010/comments","events_url":"https://api.github.com/repos/FreeRDP/FreeRDP/issues/1010/events","html_url":"https://github.com/FreeRDP/FreeRDP/issues/1010","id":11417343,"number":1010,"title":"Desktop switch (Ctrl+Alt+Arrow) causes focus loss but does not reset pressed keys.","user":{"login":"ryancalhoun","id":3706751,"avatar_url":"https://avatars1.githubusercontent.com/u/3706751?v=4","gravatar_id":"","url":"https://api.github.com/users/ryancalhoun","html_url":"https://github.com/ryancalhoun","followers_url":"https://api.github.com/users/ryancalhoun/followers","following_url":"https://api.github.com/users/ryancalhoun/following{/other_user}","gists_url":"https://api.github.com/users/ryancalhoun/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancalhoun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancalhoun/subscriptions","organizations_url":"https://api.github.com/users/ryancalhoun/orgs","repos_url":"https://api.github.com/users/ryancalhoun/repos","events_url":"https://api.github.com/users/ryancalhoun/events{/privacy}","received_events_url":"https://api.github.com/users/ryancalhoun/received_events","type":"User","site_admin":false},"labels":[{"id":17983236,"url":"https://api.github.com/repos/FreeRDP/FreeRDP/labels/stable-1.0","name":"stable-1.0","color":"FFFF12","default":false},{"id":204738,"url":"https://api.github.com/repos/FreeRDP/FreeRDP/labels/waiting-feedback","name":"waiting-feedback","color":"d7e102","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2013-02-26T16:50:05Z","updated_at":"2018-05-03T12:55:23Z","closed_at":"2018-05-03T12:55:23Z","author_association":"NONE","body":"I have a Windows machine running Cygwin. I have exposed mintty as a RemoteApp.\n\nFrom my Linux client machine, I use xfreerdp to connect to said app. I then, with mintty focused, use Ctrl+Alt+Arrow to switch desktops. Mintty loses focus. When I return, as soon as I press ENTER, my session disconnects and I get an error like this:\n\n```\nX Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)\n  Major opcode of failed request:  62 (X_CopyArea)\n  Resource id in failed request:  0x5000016\n  Serial number of failed request:  7892\n  Current serial number in output stream:  7892\n```\n\nAfter some debugging, I determined that the Ctrl+Alt keys are still in the pressed_keys map, and are used as modifiers to ENTER to toggle fullscreen.\n\nI don't believe this is desired behavior. When the window regains focus, the modifiers should reflect the current state of the keyboard, not the state it was in prior to losing focus.\n\nI made a quick and simple change to prevent my session from disconnecting--simply reset the pressed_keys when the keyboard regains focus.\n\n```\n--- ./client/X11/xf_keyboard.old.c  2013-02-15 08:17:34.000000000 -0600\n+++ ./client/X11/xf_keyboard.c  2013-02-26 10:17:12.697601331 -0600\n@@ -164,6 +164,8 @@\n    rdpInput* input;\n    uint32 syncFlags;\n\n+   memset(xfi->pressed_keys, 0, 256 * sizeof(boolean));\n+\n    input = xfi->instance->input;\n\n    /* on focus in send a tab up like mstsc.exe */\n\n```\n\nA better solution would be to re-read the keyboard state for all modifiers like Ctrl, Shift, and Alt when the state of the toggle keys are read. However, for my own use the above solution works as I need it to.\n\n---\n\nClient details:\nUbuntu 12.10 x86_64 Unity\nxfreerdp 1.0.1\n\nCommand line\n`xfreerdp -z -x l --gdi sw --app --plugin rail --data ||mintty -- IP`\n\nPatch applied to FreeRDP-stable-1.0\n"}}
{"actor":{"display_login":"akallabeth"}}