-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeGenericEvent is not hoisted to xinput event type #99
Comments
What happens if you do a xinput.HeirarchyEvent(xcffib.MemoryUnpacker(event.buf))? |
(meaning, is the resulting event reasonable?). Also does xtrace say something different? |
At first I got this error:
I switched the code to this, but I'm not sure if this is valid:
I couldn't see any interesting data after my attempted conversion:
From xtrace:
|
Dang. I was hoping this would just be a matter of re-interpreting the event, but it seems it's more complicated than that. As the readme notes, we don't really have a great readme for XGE, in part because even xcb-proto has never really supported it. Oddly, the xcb-proto spec has documentation, but not an implementation of the members. So I think it needs a patch like this: tych0/xcb-proto@54da72b And then you could do it with xcffib.xinput.HierarchyEvent(xcffib.MemoryUnpacker(e.data)). I'm not exactly sure on the layout though, see the docs cited in the above commit for details. Another nice thing would be, if this actually works, to build in an API from GeGenericEvent that would auto-parse things based on the extension and event, assuming the above works. I'll see if I can play around with it more this weekend, but those are my initial thoughts. |
Thanks, appreciate you looking into this. |
Hi there. I have a similar issue, though for XInput's pointer barriers. I gather that rebuilding I managed to get
And, yes, I import I would like to use python (and your library) for this project, though the effort to do so is rather high at the moment. Could you point out how to make the (rather convoluted) build system produce a working build, for which I could check the |
I'd just install it in a virtual env or something. Calling it xcffib2 will confuse lots of things, I think. |
Hi Tych0! I'm just running into this issue now as we're looking at whether using pointer barriers in qtile may be a way to change the focus when a mouse moves to a new screen. I'm getting the same There's reference to a Current code is here: elParaguayo/qtile@4eb5786 Dumping the event's |
@tych0 I've been doing a bit more digging here (with a disclaimer that I've spent very little time in the My main issue is that the Ideally, I'd be happy to help work on that last bit but I'm at a loss to understand why Any ideas? FWIW - I played with some code that m-col wrote and was able to cast the |
I don't think any of this was ever merged, that was a local hack that I had to just see if we could get it to work. might be an interesting starting point, though.
Yeah, i suspect that's because the xml doesn't have the right fields (hence my hack patch above). you might start a discussion on the https://lists.freedesktop.org/mailman/listinfo/xcb mailing list about implementing XGE support to see if anyone else is interested in helping wire up the xml. |
My goal is to write a program that monitors xinput hierarchy events, but I can only receive
xcffib.xproto.GeGenericEvent
, which I can't figure out how to do anything of use with.I'm new to XCB and X11 programming, so I'm sure the fault is my code. I have looked at some examples using libxcb directly though, and I'm having trouble figuring out the python calls. Here is what I have come up with so far:
Reproduction Steps:
Expected Output:
Actual Output:
The text was updated successfully, but these errors were encountered: