[Xcb] Synchronization problem.

Julien Danjou julien at danjou.info
Tue Aug 26 09:39:57 PDT 2008

At 1218051476 time_t, Barton C Massey wrote:
> > I need to sync() for an unknown reason. If I don't, some of my requests
> > are not (pick one or several): sent to the X server, treated by the X
> > server, visible on screen.
> This sounds like a bug to me.  I assume you've reported it.
> Any test case that might let us reproduce it would be really
> helpful.

I don't have a test case yet, but sniffing with wireshark gave me weird
stuff, and I'd like an opinion.
This is reproducible in current awesome version FWIW.

I send a bunch of command via a socket to my application (awesome). It
generates a bunch of X requests, mainly drawing and finally generating
a CopyArea request to copy what get rendered to a pixmap.

My problem is that this events are _not_ sent.

Not sent, UNTIL a new event come in, and in this case the bunch of
requests are sent out.

In this example, the new event is a Leave/Enter notify since I move my
mouse from the root window my application window after sending a bunch
of command to my application via its socket.

In wireshark I get this:
Time            Info
0.0000000       Event: LeaveNotify, EnterNotify
0.0000006       Requests:
                  6x Unknown OpCode 150
                  5x Uknown opcode 150
                  2x ConfigureWindow
                  16x GrabButton
0.000087       Event: …

And the code of my enter notify callback function is:
return 0;

So it does not generate any more request.

I don't know if it's a bug in libxcb, I'd rather think it's a misuse
somewhere. Anyone has a pointer or something I could call to get the
request queue size, informations, anything?

Calling xcb_aux_sync() after polling events and sending requests resolve
the problem but this is not a good solution IMHO.

Julien Danjou
// ᐰ <julien at danjou.info>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20080826/76b421b5/attachment.pgp 

More information about the Xcb mailing list