-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
Some conversion to XCB #3
Conversation
This got broken in commit fcef5e7. Signed-off-by: Uli Schlachter <psychon@znc.in>
No functional changes intended. The new xcb_damage_query_version() was previously done by XDamageQueryExtension() internally. Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Wow, that's a lot of work in a short amount of time. We certainly would need to do as much testing as possible before this can be merged. |
Well, most of this was quite simple & mechanical. The biggest surprise was that I'll try to finish the XFixes port tomorrow and add the resulting commit to this PR (if it's not merged by then). Testing-wise... well, it seems to work here. ;-) |
@psychon |
Edit: First of all, sorry for breaking something. Also, boy is Oh, right. The strings in the answer are not null-terminated, so diff --git a/src/compton.c b/src/compton.c
index 5c7e845..04eab3e 100644
--- a/src/compton.c
+++ b/src/compton.c
@@ -4740,7 +4740,8 @@ init_filters(session_t *ps) {
xcb_str_iterator_t iter = xcb_render_query_filters_filters_iterator(pf);
for (; iter.rem; xcb_str_next(&iter)) {
// Convolution filter
- if (!strcmp(xcb_str_name(iter.data), XRFILTER_CONVOLUTION))
+ if (strlen(XRFILTER_CONVOLUTION) == xcb_str_name_length(iter.data)
+ && !memcmp(XRFILTER_CONVOLUTION, xcb_str_name(iter.data), strlen(XRFILTER_CONVOLUTION)))
ps->xrfilter_convolution_exists = true;
}
free(pf); Will push this as a new commit. |
The X11 server's answer is not \0-terminated, so xcb_str_name() also does not provide a \0-terminated pointer. Signed-off-by: Uli Schlachter <psychon@znc.in>
As expected. Anyway, this looks fine. I will go through it again and probably merge it later today. |
Presumably they think it is a good idea to require the client send what version it supports to avoid incompatibilities. And somehow they decided to do that in this ONE EXTENSION ONLY. Typical Xorg. |
Thanks for merging. Feel free to @psychon me in case some issues show up. I did read some libXdamage source code to figure out this stuff. ;-) |
This contains some (barely tested) conversion to XCB. This was almost merely build-tested and I guess that some of the code is not built by default (but I am not totally sure). So, feel free to tell me about any breakage that I caused.
I tried to be careful with this. For example, I am in the middle of the xcb-xfixes conversion (but won't be able to finish it today) and here I noticed that the order of parameters in
xcb_xfixes_copy_region
andxcb_xfixes_union_region
is different than with Xlib. Still, I can NOT guarantee that I did not miss anything.