{"action":"created","issue":{"url":"https://api.github.com/repos/glfw/glfw/issues/410","labels_url":"https://api.github.com/repos/glfw/glfw/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/glfw/glfw/issues/410/comments","events_url":"https://api.github.com/repos/glfw/glfw/issues/410/events","html_url":"https://github.com/glfw/glfw/issues/410","id":53372552,"number":410,"title":"Mouse button release not detected when drag operation is canceled","user":{"login":"assemblerbot","id":10397458,"avatar_url":"https://avatars.githubusercontent.com/u/10397458?v=3","gravatar_id":"","url":"https://api.github.com/users/assemblerbot","html_url":"https://github.com/assemblerbot","followers_url":"https://api.github.com/users/assemblerbot/followers","following_url":"https://api.github.com/users/assemblerbot/following{/other_user}","gists_url":"https://api.github.com/users/assemblerbot/gists{/gist_id}","starred_url":"https://api.github.com/users/assemblerbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/assemblerbot/subscriptions","organizations_url":"https://api.github.com/users/assemblerbot/orgs","repos_url":"https://api.github.com/users/assemblerbot/repos","events_url":"https://api.github.com/users/assemblerbot/events{/privacy}","received_events_url":"https://api.github.com/users/assemblerbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/glfw/glfw/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/glfw/glfw/labels/unverified","name":"unverified","color":"00ffff"},{"url":"https://api.github.com/repos/glfw/glfw/labels/Windows","name":"Windows","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"elmindreda","id":133714,"avatar_url":"https://avatars.githubusercontent.com/u/133714?v=3","gravatar_id":"","url":"https://api.github.com/users/elmindreda","html_url":"https://github.com/elmindreda","followers_url":"https://api.github.com/users/elmindreda/followers","following_url":"https://api.github.com/users/elmindreda/following{/other_user}","gists_url":"https://api.github.com/users/elmindreda/gists{/gist_id}","starred_url":"https://api.github.com/users/elmindreda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmindreda/subscriptions","organizations_url":"https://api.github.com/users/elmindreda/orgs","repos_url":"https://api.github.com/users/elmindreda/repos","events_url":"https://api.github.com/users/elmindreda/events{/privacy}","received_events_url":"https://api.github.com/users/elmindreda/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-01-05T07:58:06Z","updated_at":"2015-01-05T19:04:53Z","closed_at":null,"body":"On Windows platform only:\r\n\r\n**Steps to reproduce**:\r\n1. implement some kind of drag&drop mechanism or mouse capture for GLFW window (see link bellow for examples)\r\n2. start dragging when mouse button is pressed\r\n3. when drag operation is interrupted or dropped to window which doesn't accept dragged content, mouse button remains virtually pressed\r\n\r\n**First solution**: is described there: http://www.drdobbs.com/avoiding-trouble-with-mouse-capture/184416474\r\nIn short: just handle messages WM_CAPTURECHANGED and WM_CANCELMODE and check real state of mouse buttons there.\r\n\r\n**Second solution**: add some GLFW function so program can tell GLFW window to evaluate keys and mouse buttons states - something like RefreshInputs ..\r\n"},"comment":{"url":"https://api.github.com/repos/glfw/glfw/issues/comments/68758021","html_url":"https://github.com/glfw/glfw/issues/410#issuecomment-68758021","issue_url":"https://api.github.com/repos/glfw/glfw/issues/410","id":68758021,"user":{"login":"elmindreda","id":133714,"avatar_url":"https://avatars.githubusercontent.com/u/133714?v=3","gravatar_id":"","url":"https://api.github.com/users/elmindreda","html_url":"https://github.com/elmindreda","followers_url":"https://api.github.com/users/elmindreda/followers","following_url":"https://api.github.com/users/elmindreda/following{/other_user}","gists_url":"https://api.github.com/users/elmindreda/gists{/gist_id}","starred_url":"https://api.github.com/users/elmindreda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmindreda/subscriptions","organizations_url":"https://api.github.com/users/elmindreda/orgs","repos_url":"https://api.github.com/users/elmindreda/repos","events_url":"https://api.github.com/users/elmindreda/events{/privacy}","received_events_url":"https://api.github.com/users/elmindreda/received_events","type":"User","site_admin":false},"created_at":"2015-01-05T19:04:53Z","updated_at":"2015-01-05T19:04:53Z","body":"Unable to reproduce.\r\n\r\nWhat is the bug here? As the article says, `DefWindowProc` already calls `ReleaseCapture` at the appropriate times. GLFW already synthesizes button release events on focus loss."}}