3608
|
1 |
--- pulseaudio-0.9.22/configure.ac-orig 2011-07-14 03:12:54.768084315 -0500
|
|
2 |
+++ pulseaudio-0.9.22/configure.ac 2011-07-14 03:13:23.147606522 -0500
|
|
3 |
@@ -516,7 +516,7 @@ AC_ARG_ENABLE([x11],
|
|
4 |
[x11=auto])
|
|
5 |
|
|
6 |
if test "x${x11}" != xno ; then
|
|
7 |
- PKG_CHECK_MODULES(X11, [ x11-xcb ice sm xtst xcb-atom ],
|
|
8 |
+ PKG_CHECK_MODULES(X11, [ x11-xcb xcb >= 1.6 ice sm xtst ],
|
|
9 |
HAVE_X11=1,
|
|
10 |
[
|
|
11 |
HAVE_X11=0
|
|
12 |
--- pulseaudio-0.9.22/src/pulsecore/x11prop.c-orig 2011-07-14 02:58:51.526660985 -0500
|
|
13 |
+++ pulseaudio-0.9.22/src/pulsecore/x11prop.c 2011-07-14 03:10:45.123567613 -0500
|
|
14 |
@@ -30,7 +30,6 @@
|
|
15 |
#include <pulsecore/macro.h>
|
|
16 |
|
|
17 |
#include <xcb/xproto.h>
|
|
18 |
-#include <xcb/xcb_atom.h>
|
|
19 |
|
|
20 |
#define PA_XCB_FORMAT 8
|
|
21 |
|
|
22 |
@@ -50,28 +49,43 @@ static xcb_screen_t *screen_of_display(x
|
|
23 |
|
|
24 |
void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const char *data) {
|
|
25 |
xcb_screen_t *xs;
|
|
26 |
- xcb_atom_t a;
|
|
27 |
+ xcb_intern_atom_reply_t *reply;
|
|
28 |
|
|
29 |
pa_assert(xcb);
|
|
30 |
pa_assert(name);
|
|
31 |
pa_assert(data);
|
|
32 |
|
|
33 |
if ((xs = screen_of_display(xcb, screen))) {
|
|
34 |
- a = xcb_atom_get(xcb, name);
|
|
35 |
- xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, a, STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data);
|
|
36 |
+ reply = xcb_intern_atom_reply(xcb,
|
|
37 |
+ xcb_intern_atom(xcb, 0, strlen(name), name),
|
|
38 |
+ NULL);
|
|
39 |
+
|
|
40 |
+ if (reply) {
|
|
41 |
+ xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom,
|
|
42 |
+ XCB_ATOM_STRING, PA_XCB_FORMAT,
|
|
43 |
+ (int) strlen(data), (const void*) data);
|
|
44 |
+
|
|
45 |
+ free(reply);
|
|
46 |
+ }
|
|
47 |
}
|
|
48 |
}
|
|
49 |
|
|
50 |
void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name) {
|
|
51 |
xcb_screen_t *xs;
|
|
52 |
- xcb_atom_t a;
|
|
53 |
+ xcb_intern_atom_reply_t *reply;
|
|
54 |
|
|
55 |
pa_assert(xcb);
|
|
56 |
pa_assert(name);
|
|
57 |
|
|
58 |
if ((xs = screen_of_display(xcb, screen))) {
|
|
59 |
- a = xcb_atom_get(xcb, name);
|
|
60 |
- xcb_delete_property(xcb, xs->root, a);
|
|
61 |
+ reply = xcb_intern_atom_reply(xcb,
|
|
62 |
+ xcb_intern_atom(xcb, 0, strlen(name), name),
|
|
63 |
+ NULL);
|
|
64 |
+
|
|
65 |
+ if (reply) {
|
|
66 |
+ xcb_delete_property(xcb, xs->root, reply->atom);
|
|
67 |
+ free(reply);
|
|
68 |
+ }
|
|
69 |
}
|
|
70 |
}
|
|
71 |
|
|
72 |
@@ -81,7 +95,7 @@ char* pa_x11_get_prop(xcb_connection_t *
|
|
73 |
xcb_get_property_cookie_t req;
|
|
74 |
xcb_get_property_reply_t* prop = NULL;
|
|
75 |
xcb_screen_t *xs;
|
|
76 |
- xcb_atom_t a;
|
|
77 |
+ xcb_intern_atom_reply_t *reply;
|
|
78 |
|
|
79 |
pa_assert(xcb);
|
|
80 |
pa_assert(name);
|
|
81 |
@@ -99,9 +113,15 @@ char* pa_x11_get_prop(xcb_connection_t *
|
|
82 |
xs = screen_of_display(xcb, 0);
|
|
83 |
|
|
84 |
if (xs) {
|
|
85 |
- a = xcb_atom_get(xcb, name);
|
|
86 |
+ reply = xcb_intern_atom_reply(xcb,
|
|
87 |
+ xcb_intern_atom(xcb, 0, strlen(name), name),
|
|
88 |
+ NULL);
|
|
89 |
+
|
|
90 |
+ if (!reply)
|
|
91 |
+ goto finish;
|
|
92 |
|
|
93 |
- req = xcb_get_property(xcb, 0, xs->root, a, STRING, 0, (uint32_t)(l-1));
|
|
94 |
+ req = xcb_get_property(xcb, 0, xs->root, reply->atom, XCB_ATOM_STRING, 0, (uint32_t)(l-1));
|
|
95 |
+ free(reply);
|
|
96 |
prop = xcb_get_property_reply(xcb, req, NULL);
|
|
97 |
|
|
98 |
if (!prop)
|