<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - xinput2 XIQueryDevice reply not read correctly"
href="https://bugs.freedesktop.org/show_bug.cgi?id=68387#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - xinput2 XIQueryDevice reply not read correctly"
href="https://bugs.freedesktop.org/show_bug.cgi?id=68387">bug 68387</a>
from <span class="vcard"><a class="email" href="mailto:ran234@gmail.com" title="Ran Benita <ran234@gmail.com>"> <span class="fn">Ran Benita</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=68387#c5">comment #5</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=68387#c3">comment #3</a>)
> > For example,
> > I'm pretty sure xcb_get_setup() is broken when there is more than one Screen
> > (roots_len > 1) - in this case the attached program should show garbage.
>
> Nope, works fine here. I tested this against "Xephyr -screen 1000x500
> -screen 500x500 :1" and diff't the output for the two screens. Only IDs were
> different (e.g. the visual IDs).
>
> What exactly would you expect to go wrong and why does it still work
> correctly?</span >
Thanks for trying, I didn't know about this Xephyr trick. And you're right;
while xcb_screen_sizeof() uses xcb_tmp, it doesn't in fact increment it twice:
xcb_block_len += sizeof(xcb_screen_t);
xcb_tmp += xcb_block_len;
/* allowed_depths */
for(i=0; i<_aux->allowed_depths_len; i++) {
xcb_tmp_len = xcb_depth_sizeof(xcb_tmp);
xcb_block_len += xcb_tmp_len;
xcb_tmp += xcb_tmp_len;
}
i.e in this case the struct and the depths are considered in the same 'block'
(intended or not...). By looking, there aren't any iterator bugs in xproto to
show off :) like in xinput and xkb.
However to 'compensate', xcb_setup_sizeof() is definitely broken, e.g. on my
machine, should be: 5972, reported: 6284. To see this you can add
printf("offset: %ld\n", (char *) visuals_iter.data - (char *) setup);
right after
xcb_visualtype_next(&visuals_iter);
and look at the last offset. With the patch the reported sizeof is correct.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>