XI2 protocol raw events do not provide a sourceid, the libXi header however does. This value is always 0. This is likely caused by a copy/paste bug and sourceid shouldn't be in the interface here. However, Xlib is set in stone and we can't remove it, so maybe adding it to the server is the best idea.
http://patchwork.freedesktop.org/patch/6547/ http://patchwork.freedesktop.org/patch/6548/ http://patchwork.freedesktop.org/patch/6549/ http://patchwork.freedesktop.org/patch/6550/
xserver support added in XI 2.1 (server version 1.12) libXi commit 2ac185d2fd2b884f4f59a7f7f61f414d139859aa
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.