[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-211-g65e8078
Lennart Poettering
gitmailer-noreply at 0pointer.de
Thu Oct 29 21:39:08 PDT 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 366ab9633be76c920738dc806607d7656dda5191 (commit)
- Log -----------------------------------------------------------------
65e8078 X11: attach X11 properties to Screen, not Display
-----------------------------------------------------------------------
Summary of changes:
src/pulsecore/x11prop.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
commit 65e8078a3bba6360f7918b2a721510d78826eece
Author: Leszek Koltunski <leszek at koltunski.pl>
Date: Tue Oct 27 19:57:43 2009 +0800
X11: attach X11 properties to Screen, not Display
diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c
index 873a76e..dc8ec29 100644
--- a/src/pulsecore/x11prop.c
+++ b/src/pulsecore/x11prop.c
@@ -32,12 +32,12 @@
void pa_x11_set_prop(Display *d, const char *name, const char *data) {
Atom a = XInternAtom(d, name, False);
- XChangeProperty(d, RootWindow(d, 0), a, XA_STRING, 8, PropModeReplace, (const unsigned char*) data, (int) (strlen(data)+1));
+ XChangeProperty(d, DefaultRootWindow(d), a, XA_STRING, 8, PropModeReplace, (const unsigned char*) data, (int) (strlen(data)+1));
}
void pa_x11_del_prop(Display *d, const char *name) {
Atom a = XInternAtom(d, name, False);
- XDeleteProperty(d, RootWindow(d, 0), a);
+ XDeleteProperty(d, DefaultRootWindow(d), a);
}
char* pa_x11_get_prop(Display *d, const char *name, char *p, size_t l) {
@@ -47,13 +47,21 @@ char* pa_x11_get_prop(Display *d, const char *name, char *p, size_t l) {
unsigned long nbytes_after;
unsigned char *prop = NULL;
char *ret = NULL;
+ int window_ret;
Atom a = XInternAtom(d, name, False);
- if (XGetWindowProperty(d, RootWindow(d, 0), a, 0, (long) ((l+2)/4), False, XA_STRING, &actual_type, &actual_format, &nitems, &nbytes_after, &prop) != Success)
- goto finish;
- if (actual_type != XA_STRING)
- goto finish;
+ window_ret = XGetWindowProperty(d, DefaultRootWindow(d), a, 0, (long) ((l+2)/4), False, XA_STRING, &actual_type, &actual_format, &nitems, &nbytes_after, &prop);
+
+ if (window_ret != Success || actual_type != XA_STRING) {
+ if (DefaultScreen(d) != 0) {
+ window_ret = XGetWindowProperty(d, RootWindow(d, 0), a, 0, (long) ((l+2)/4), False, XA_STRING, &actual_type, &actual_format, &nitems, &nbytes_after, &prop);
+
+ if (window_ret != Success || actual_type != XA_STRING)
+ goto finish;
+ } else
+ goto finish;
+ }
memcpy(p, prop, nitems);
p[nitems] = 0;
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list