Oh my god, I'm retarded. This has (in my case) nothing to do with pointers at all. What happens is that the application calls XTestFakeKeyEvent after a successful gesture, and if no physical key has been pressed yet during that session, then the master device is the only availabe keyboard, which XTest will use. Now I had to set a breakpoint in mieqEnqueueEvent to figure that out...
Oh my god, I'm retarded. This has (in my case) nothing to do with pointers at all. What happens is that the application calls XTestFakeKeyEvent after a successful gesture, and if no physical key has been pressed yet during that session, then the master device is the only availabe keyboard, which XTest will use. Now I had to set a breakpoint in mieqEnqueueEvent to figure that out...