summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorMaciej Grela <maciej.grela@gmail.com>2011-03-29 22:56:28 +0159
committerColin Guthrie <colin@mageia.org>2011-04-28 09:52:41 +0100
commit88e6078f3b74002c58b69f8b69f6c043d65ef80b (patch)
tree985a42258029409352b8527962c620631f355abf /src/pulsecore
parentfd14a9af359657c5c3b9bd8b031c4b7cacd6e357 (diff)
x11: Fix build errors with newest xcb-util.
The xcb_atom_get functions were removed from xcb-util. Changed these to xcb_intern_atom/xcb_intern_atom_reply. Also, STRING is now XCB_ATOM_STRING.
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/x11prop.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c
index 8df32788..99ea55df 100644
--- a/src/pulsecore/x11prop.c
+++ b/src/pulsecore/x11prop.c
@@ -49,28 +49,34 @@ static xcb_screen_t *screen_of_display(xcb_connection_t *xcb, int screen) {
void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const char *data) {
xcb_screen_t *xs;
- xcb_atom_t a;
+ xcb_intern_atom_cookie_t cookie;
+ xcb_intern_atom_reply_t *reply;
pa_assert(xcb);
pa_assert(name);
pa_assert(data);
if ((xs = screen_of_display(xcb, screen))) {
- a = xcb_atom_get(xcb, name);
- xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, a, STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data);
+ cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
+ reply = xcb_intern_atom_reply(xcb, cookie, NULL);
+
+ xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom, XCB_ATOM_STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data);
}
}
void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name) {
xcb_screen_t *xs;
- xcb_atom_t a;
+ xcb_intern_atom_cookie_t cookie;
+ xcb_intern_atom_reply_t *reply;
pa_assert(xcb);
pa_assert(name);
if ((xs = screen_of_display(xcb, screen))) {
- a = xcb_atom_get(xcb, name);
- xcb_delete_property(xcb, xs->root, a);
+ cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
+ reply = xcb_intern_atom_reply(xcb, cookie, NULL);
+
+ xcb_delete_property(xcb, xs->root, reply->atom);
}
}
@@ -80,7 +86,8 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char
xcb_get_property_cookie_t req;
xcb_get_property_reply_t* prop = NULL;
xcb_screen_t *xs;
- xcb_atom_t a;
+ xcb_intern_atom_cookie_t cookie;
+ xcb_intern_atom_reply_t *reply;
pa_assert(xcb);
pa_assert(name);
@@ -98,9 +105,10 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char
xs = screen_of_display(xcb, 0);
if (xs) {
- a = xcb_atom_get(xcb, name);
+ cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
+ reply = xcb_intern_atom_reply(xcb, cookie, NULL);
- req = xcb_get_property(xcb, 0, xs->root, a, STRING, 0, (uint32_t)(l-1));
+ req = xcb_get_property(xcb, 0, xs->root, reply->atom, XCB_ATOM_STRING, 0, (uint32_t)(l-1));
prop = xcb_get_property_reply(xcb, req, NULL);
if (!prop)