[Xcb] client message event strangeness
Vincent Torri
vtorri at univ-evry.fr
Tue Apr 10 22:50:25 PDT 2007
On Tue, 10 Apr 2007, Ian Osgood wrote:
>>>> Hey,
>>>> I have a strange behavior with ecore_xcb, and another simple xcb prog,
>>>> btw.
>>>> I want to get the event that is sent when I click on little cross of the
>>>> title bar (to delete a prog).
>>>> It should be the event #33 (client message). It seems reasonnable, and
>>>> Xlib sends it.
>>>> Now, with the cursor example (see the tutorial), if I add a printf when
>>>> an event is found:
>>>>
>>>> if (e) {
>>>> printf ("event : %d\n", e->response_type);
>>>> nothing is displayed (xcb_poll_for_event is used) and the window
>>>> disappear.
>>>> With ecore_xcb (which is my main concern, actually), I get the event
>>>> #161, which is strange as X has only a maximum of event number of 35
>>>> (LASTEvent in Xlib, which is, btw, not defined in XCB. Has it been
>>>> forgotten ?)
>>>> Is there a logical explanation of that mess ?
>>>> thank you
>>>> Vincent
>>>
>>> Don't forget that the 8th bit (0x80) is set if it is a client event. This
>>> is exactly the case here (161 == 128 | 33).
>>
>> does it mean that, when I get an event named e, the type of the response is
>> (e->response_type & ~0x80) ?
>>
>> Vincent
>
> Yes. I fixed this in your tutorials a year ago (for example,
> tutorial/index.html#loop).
haa, indeed. I think that I have missed that commit.
Another question about events. If an extension has an event (like damage,
for example), is that 7th bit also set for the first_event member of the
reply structure ?
Vincent
More information about the Xcb
mailing list