[Xcb] xcb-xinput -- raw motion events

Ingo Bürk admin at airblader.de
Tue May 26 13:43:56 PDT 2015


Hi,

a follow up question regarding mixing Xlib and XCB: I'm now using Xlib
to select the XI events
and still use XCB for the rest, including the event loop (ownership has
been set to XCB).

How do I detect the XI_RawMotion event in the event loop now, though? It
seems that I receive it as type 35,
but both Xlib and XCB define the code to be 17. Storing the offset for
the xinput extension (queried through XCB, but that shouldn't matter,
no?) shows an offset of 66 in my case. So I'm not quite sure how these
numbers would make up the 35 I'm seeing.


Ingo

On 05/26/2015 06:54 AM, chris at demorecorder.com wrote:
> Hi Ingo,
>
> For XInput, I suggest that you use the current HEAD from git 
>    http://cgit.freedesktop.org/xcb/proto
>    http://cgit.freedesktop.org/xcb/libxcb
>
> The reason is that in the previous official version, xinput is not officially supported 
> and contains a lot of bugs and missing pieces, most of which are fixed in the git-HEAD.
>
> That may be the reason why you weren't able to figure it out.
>
> Hope this helps,
>
> Chris
>
> Ingo Bürk wrote on 25.05.2015 23:40:
>
> Hi,
>> I want to receive all (raw) motion events on a window for which I am trying to use xcb-xinput.
>> Unfortunately, I can't seem to figure out how to use it. I found the Xlib equivalent[1], but am unable to translate it to xcb. Would someone mind giving me a small push on how I can set XCB_INPUT_XI_EVENT_MASK_RAW_MOTION on a window?
>>
>> Addendum / Additional Info: I am currently using XCB_EVENT_MASK_POINTER_MOTION, but it seems that selecting motion events on children of Chromium windows break Chromium[2] (wtf), so my hope is that using XInput would work around this issue.
>>
>>
>> Thanks!
>> Ingo
>>
>> [1] http://keithp.com/blogs/Cursor_tracking/ <http://keithp.com/blogs/Cursor_tracking/> 
>> [2] https://code.google.com/p/chromium/issues/detail?id=491934 <https://code.google.com/p/chromium/issues/detail?id=491934>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb



More information about the Xcb mailing list