{"action":"created","issue":{"url":"https://api.github.com/repos/Ciantic/VirtualDesktopAccessor/issues/4","labels_url":"https://api.github.com/repos/Ciantic/VirtualDesktopAccessor/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Ciantic/VirtualDesktopAccessor/issues/4/comments","events_url":"https://api.github.com/repos/Ciantic/VirtualDesktopAccessor/issues/4/events","html_url":"https://github.com/Ciantic/VirtualDesktopAccessor/issues/4","id":118302470,"number":4,"title":"Window focus stays at previous virtual desktop","user":{"login":"c0ffeeartc","id":5057859,"avatar_url":"https://avatars.githubusercontent.com/u/5057859?v=3","gravatar_id":"","url":"https://api.github.com/users/c0ffeeartc","html_url":"https://github.com/c0ffeeartc","followers_url":"https://api.github.com/users/c0ffeeartc/followers","following_url":"https://api.github.com/users/c0ffeeartc/following{/other_user}","gists_url":"https://api.github.com/users/c0ffeeartc/gists{/gist_id}","starred_url":"https://api.github.com/users/c0ffeeartc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c0ffeeartc/subscriptions","organizations_url":"https://api.github.com/users/c0ffeeartc/orgs","repos_url":"https://api.github.com/users/c0ffeeartc/repos","events_url":"https://api.github.com/users/c0ffeeartc/events{/privacy}","received_events_url":"https://api.github.com/users/c0ffeeartc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-23T00:57:51Z","updated_at":"2015-11-23T06:24:03Z","closed_at":"2015-11-23T06:24:03Z","body":"When I switch worskpaces through hotkey - focus stays on the old workspace, and keypresses are received by previous window.\r\nI have partial solution, that has other drawbacks\r\n```\r\n#u::\r\n    DllCall(GoToDesktopNumberProc, Int, 0)\r\n    Send, {ALT DOWN}{TAB}{ALT UP}\r\nreturn\r\n#i::\r\n    DllCall(GoToDesktopNumberProc, Int, 1)\r\n    Send, {ALT DOWN}{TAB}{ALT UP}\r\nreturn\r\n```\r\n  - Brings focus to correct workspace, yay\r\n  - Blinks\r\n  - May work as swap two windows on current workspace. Hmm\r\n  - Sometimes also swaps window on switching workspace.\r\n\r\nAnyone else experienced issue, is there a better solution workaround ?"},"comment":{"url":"https://api.github.com/repos/Ciantic/VirtualDesktopAccessor/issues/comments/158860971","html_url":"https://github.com/Ciantic/VirtualDesktopAccessor/issues/4#issuecomment-158860971","issue_url":"https://api.github.com/repos/Ciantic/VirtualDesktopAccessor/issues/4","id":158860971,"user":{"login":"Ciantic","id":64731,"avatar_url":"https://avatars.githubusercontent.com/u/64731?v=3","gravatar_id":"","url":"https://api.github.com/users/Ciantic","html_url":"https://github.com/Ciantic","followers_url":"https://api.github.com/users/Ciantic/followers","following_url":"https://api.github.com/users/Ciantic/following{/other_user}","gists_url":"https://api.github.com/users/Ciantic/gists{/gist_id}","starred_url":"https://api.github.com/users/Ciantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ciantic/subscriptions","organizations_url":"https://api.github.com/users/Ciantic/orgs","repos_url":"https://api.github.com/users/Ciantic/repos","events_url":"https://api.github.com/users/Ciantic/events{/privacy}","received_events_url":"https://api.github.com/users/Ciantic/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T06:24:03Z","updated_at":"2015-11-23T06:24:03Z","body":"I'm closing this, initial test shows this does something like that:\r\n\r\n```\r\nRegisterPostMessageHookProc := DllCall(\"GetProcAddress\", Ptr, hVirtualDesktopAccessor, AStr, \"RegisterPostMessageHook\", \"Ptr\")\r\nDllCall(RegisterPostMessageHookProc, Int, hwnd, Int, 0x1400 + 30)\r\nOnMessage(0x1400 + 30, \"VWMess\")\r\nVWMess(wParam, lParam, msg, hwnd) {\r\n    ; ...\r\n    Send !{Esc} ; ALT+Esc activates last window\r\n}\r\n```\r\n\r\nBut it's not an issue in this DLL/wrapper itself, it's a missing feature in Windows 10 desktop implementation."}}