-
Notifications
You must be signed in to change notification settings - Fork 13
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
KeyReleaseEvent.Bytes() doesn't write type #6
Comments
Yes, you're definitely right. I've created test programs in c (c++?) using xcb and go using xgb and the xcb version gives different first byte for key release.
Not that I've doubted you, but now there is a proof. The thing is that the What I want to say is that the solution to simply edit the Help would be appreciated. Can you try to make the patches? Note: I've seen @aarzilli has a branch with changes to |
Sure, I'll take a look at getting |
The actual fix for the initial issue is pretty simple but 1.14 support is more problematic. I've managed to get it running with 1.14 on my fork, but I think aarzilli's version might be better. My code has a few pretty bad workarounds for things I didn't understand within All of the tests in |
I see, the patch for the pre-1.14 version is really simple. Maybe before the bigger patch to 1.14, the code could be regenerated with your patch on the original xcb-proto version (1.10, 1.11?), so there will be only minimal changes fixing only this issue. After that the transition to newer xcb-proto versions can be done in new issue. Do you agree? |
Sure, sounds good. I can make a PR with just the 3 line change if you want, or you can push it yourself since it's pretty simple. |
Can you make a PR? Ideal would be 2 commits.
This way it should be easy to review the changes, because only the release events should change. Thank you. |
I believe that
KeyReleaseEvent.Bytes()
should set the first byte of the event to 3, which is the KeyRelease event type. The current behavior with just returning the value ofKeyPressEvent.Bytes()
returns the bytes for a key press event (which has type 2), not a key release event.xgb/xproto/xproto.go
Lines 3414 to 3416 in 7a4fade
Manually setting the 0th byte to 3 after creates a proper KeyRelease event to be sent with
SendEvent
. (excerpt from my code)This same issue seems to be present with other event types as well, such as
ButtonPressEvent
andButtonReleaseEvent
.xgb/xproto/xproto.go
Lines 528 to 530 in 7a4fade
The text was updated successfully, but these errors were encountered: