1 |
angelos 11/04/27 07:18:47 |
2 |
|
3 |
Added: pulseaudio-0.9.22-xcb-atom.patch |
4 |
Log: |
5 |
Fixed compilation against xcb-util-0.3.8 (bug #364965) |
6 |
|
7 |
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-sound/pulseaudio/files/pulseaudio-0.9.22-xcb-atom.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/pulseaudio/files/pulseaudio-0.9.22-xcb-atom.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/pulseaudio/files/pulseaudio-0.9.22-xcb-atom.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: pulseaudio-0.9.22-xcb-atom.patch |
16 |
=================================================================== |
17 |
From 9cee2891e8ccd4b26b16449c120ac17e01aa1b36 Mon Sep 17 00:00:00 2001 |
18 |
From: Maciej Grela <maciej.grela@×××××.com> |
19 |
Date: Tue, 29 Mar 2011 22:56:28 +0159 |
20 |
Subject: [PATCH] x11: Fix build errors with newest xcb-util. |
21 |
|
22 |
The xcb_atom_get functions were removed from xcb-util. Changed these to |
23 |
xcb_intern_atom/xcb_intern_atom_reply. Also, STRING is now |
24 |
XCB_ATOM_STRING. |
25 |
--- |
26 |
src/pulsecore/x11prop.c | 26 +++++++++++++++++--------- |
27 |
1 files changed, 17 insertions(+), 9 deletions(-) |
28 |
|
29 |
diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c |
30 |
index 8df3278..99ea55d 100644 |
31 |
--- a/src/pulsecore/x11prop.c |
32 |
+++ b/src/pulsecore/x11prop.c |
33 |
@@ -49,28 +49,34 @@ static xcb_screen_t *screen_of_display(xcb_connection_t *xcb, int screen) { |
34 |
|
35 |
void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const char *data) { |
36 |
xcb_screen_t *xs; |
37 |
- xcb_atom_t a; |
38 |
+ xcb_intern_atom_cookie_t cookie; |
39 |
+ xcb_intern_atom_reply_t *reply; |
40 |
|
41 |
pa_assert(xcb); |
42 |
pa_assert(name); |
43 |
pa_assert(data); |
44 |
|
45 |
if ((xs = screen_of_display(xcb, screen))) { |
46 |
- a = xcb_atom_get(xcb, name); |
47 |
- xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, a, STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data); |
48 |
+ cookie = xcb_intern_atom(xcb, 0, strlen(name), name); |
49 |
+ reply = xcb_intern_atom_reply(xcb, cookie, NULL); |
50 |
+ |
51 |
+ xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom, XCB_ATOM_STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data); |
52 |
} |
53 |
} |
54 |
|
55 |
void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name) { |
56 |
xcb_screen_t *xs; |
57 |
- xcb_atom_t a; |
58 |
+ xcb_intern_atom_cookie_t cookie; |
59 |
+ xcb_intern_atom_reply_t *reply; |
60 |
|
61 |
pa_assert(xcb); |
62 |
pa_assert(name); |
63 |
|
64 |
if ((xs = screen_of_display(xcb, screen))) { |
65 |
- a = xcb_atom_get(xcb, name); |
66 |
- xcb_delete_property(xcb, xs->root, a); |
67 |
+ cookie = xcb_intern_atom(xcb, 0, strlen(name), name); |
68 |
+ reply = xcb_intern_atom_reply(xcb, cookie, NULL); |
69 |
+ |
70 |
+ xcb_delete_property(xcb, xs->root, reply->atom); |
71 |
} |
72 |
} |
73 |
|
74 |
@@ -80,7 +86,8 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char |
75 |
xcb_get_property_cookie_t req; |
76 |
xcb_get_property_reply_t* prop = NULL; |
77 |
xcb_screen_t *xs; |
78 |
- xcb_atom_t a; |
79 |
+ xcb_intern_atom_cookie_t cookie; |
80 |
+ xcb_intern_atom_reply_t *reply; |
81 |
|
82 |
pa_assert(xcb); |
83 |
pa_assert(name); |
84 |
@@ -98,9 +105,10 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char |
85 |
xs = screen_of_display(xcb, 0); |
86 |
|
87 |
if (xs) { |
88 |
- a = xcb_atom_get(xcb, name); |
89 |
+ cookie = xcb_intern_atom(xcb, 0, strlen(name), name); |
90 |
+ reply = xcb_intern_atom_reply(xcb, cookie, NULL); |
91 |
|
92 |
- req = xcb_get_property(xcb, 0, xs->root, a, STRING, 0, (uint32_t)(l-1)); |
93 |
+ req = xcb_get_property(xcb, 0, xs->root, reply->atom, XCB_ATOM_STRING, 0, (uint32_t)(l-1)); |
94 |
prop = xcb_get_property_reply(xcb, req, NULL); |
95 |
|
96 |
if (!prop) |
97 |
-- |
98 |
1.7.4.1 |