XTestFakeMotionEvent()'s second argument is the screen number. That argument however is not used in the server other than for sanity checking. Valuators submitted is interpreted as screen-coordinates, but the screen number itself is not provided to GetPointerEvents(). When scale_from_screen() is called, it merely takes the coordinates and moves them according to the _current_ screen, not the one specified in the request. Potential solution to this is to add the requested screen's offset and add a new POINTER_DESKTOP flag to base everything off that.
commit 8571c648a79444bcee9a0fe6e395129116372f49 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat Jan 26 15:53:08 2013 +1000 Xext: if a root window is given in XTestFakeInput, move to that
commit 9fd6cb89539fde44a41ae5183c89ef9c8831c8dd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jan 29 15:13:44 2013 +1000 Xext: pass the current screen to miProcessDeviceEvent() from xtest calls
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.