[Xcb] Questions about property event handlers

Julien Danjou julien at danjou.info
Wed Mar 24 01:20:00 PDT 2010

Nicholas Allen <nick.allen at onlinehome.de> writes:

> I have a question regarding the property helper functions in the
> property utility library. Why is it necessary to set a default
> handler?

It's not.

> If I don't do this then my program crashes as soon as a property changes
> that it's not interested in (for which I have not set a property handler
> function).

Where does it crash exactly?

> I would think that after calling xcb_property_handlers_init() the
> default handler would be to ignore the property change and do nothing.
> Then I can just register handlers for the properties I'm actually
> interested in. Also by forcing the setting of a default handler doesn't
> that mean that xcb will query the value of properties even though I'm
> not interested in them - thus creating unnecessary protocol requests to
> the server?

Reading the code, it seems that it should be that way. But there may be
a bug.

Julien Danjou
// ᐰ <julien at danjou.info>   http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20100324/f96649e8/attachment.pgp>

More information about the Xcb mailing list