On Sun, Aug 08 2010, Uli Schlachter wrote: Hi Uli,
> I accidentally noticed that the libxcb-property library that awesome uses was
> dropped upstream[1] (libxcb-event was basically dropped, too). In order to be
> future-proof, I tried to remove this library from awesome, which is the patch
> that is attached.
That's a very good thing.
I think you're #define HANDLE stuff is the best thing you can do with
that part.
+ /* Get the property, if needed. */
+ xcb_get_property_reply_t *propr = NULL;
+ if(ev->state != XCB_PROPERTY_DELETE)
+ {
+ xcb_get_property_cookie_t cookie =
+ xcb_get_property(c, 0, ev->window, ev->atom,
+ XCB_GET_PROPERTY_TYPE_ANY, 0, length);
+ propr = xcb_get_property_reply(c, cookie, 0);
+ }
You should not do this. At least not the call to
xcb_get_property_reply(): you're doing it synchronously, whereas you may
be able to do some stuff between the request and the reply, in the
handler code. That's one of the reason we've killed libxcb-property.
+void a_xcb_set_property_handlers(void)
+{
+ /* Register our handler for PropertyNotify events */
+ xcb_event_set_property_notify_handler(&globalconf.evenths,
handle_propertynotify, NULL);
}
I think libxcb-event will die too. ;)
--
Julien Danjou
// ᐰ <[email protected]> http://julien.danjou.info
pgpHBASf2exuU.pgp
Description: PGP signature
