[Xcb] client message event strangeness

Ian Osgood iano at quirkster.com
Tue Apr 10 17:31:29 PDT 2007


On Apr 10, 2007, at 4:03 PM, Vincent Torri wrote:

>
>
> On Tue, 10 Apr 2007, Ian Osgood wrote:
>
>>
>> On Apr 10, 2007, at 10:11 AM, Vincent Torri 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).

Ian



More information about the Xcb mailing list