[Xcb] Window closed event and xcb_connect return value.
shuLhan
m.shulhan at gmail.com
Fri Apr 24 05:10:02 PDT 2009
thank for quick reply Julien,
Julien Danjou wrote:
> At 1240571698 time_t, shuLhan wrote:
>> 1. how to get window-closed event ?
>
> Select unmap or destroy notify on the window.
>
i will check this later.
>> 2. how do i check fail in xcb_connect() ?
>>
>> when i check in xcb_util.c, xcb_connect return
>> (xcb_connection_t *) 1 if error. since xcb_connection_t is
>> (struct) opaque type how do i cast this to integer ?
>
> Just cast it.
>
i have try it before, like this:
c = xcb_connect(NULL, &screen_nbr);
s = (int) c;
if (s == 1) {
printf("error");
return 1;
}
if xcb_connect is not successful it will seg-fault.
More information about the Xcb
mailing list