xserver: Branch 'xorg-server-1.4-apple' - 3 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Sun Sep 6 14:06:48 PDT 2009
hw/xquartz/mach-startup/bundle-main.c | 2 +-
hw/xquartz/mach-startup/launchd_fd.c | 7 +++++--
hw/xquartz/pbproxy/x-selection.h | 1 +
hw/xquartz/pbproxy/x-selection.m | 14 +++++++-------
4 files changed, 14 insertions(+), 10 deletions(-)
New commits:
commit 245baef28386c35c6da30096517ea084d5d822b9
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Sun Sep 6 14:02:53 2009 -0700
XQuartz: launchd: Fallback on :0 if prefix:0 gives an error for the socket name
(cherry picked from commit 647c871dc9f2d0adc172b401cde89ffbdfcc4d7a)
diff --git a/hw/xquartz/mach-startup/launchd_fd.c b/hw/xquartz/mach-startup/launchd_fd.c
index 51017d6..fa623ea 100644
--- a/hw/xquartz/mach-startup/launchd_fd.c
+++ b/hw/xquartz/mach-startup/launchd_fd.c
@@ -71,8 +71,11 @@ int launchd_display_fd() {
listening_fd_array = launch_data_dict_lookup(sockets_dict, LAUNCHD_ID_PREFIX":0");
if (NULL == listening_fd_array) {
- fprintf(stderr,"launchd check-in: No known sockets found to answer requests on! %s failed.\n", LAUNCHD_ID_PREFIX".startx:0");
- return ERROR_FD;
+ listening_fd_array = launch_data_dict_lookup(sockets_dict, ":0");
+ if (NULL == listening_fd_array) {
+ fprintf(stderr,"launchd check-in: No known sockets found to answer requests on! \"%s:0\" and \":0\" failed.\n", LAUNCHD_ID_PREFIX);
+ return ERROR_FD;
+ }
}
if (launch_data_array_get_count(listening_fd_array)!=1) {
commit aa591b3d21524cc23c8d2136dbfafb86b4ad14da
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Sat Sep 5 14:04:53 2009 -0700
XQuartz: Fix "warning: function declaration isnât a prototype" noise
(cherry picked from commit 9a77905a975e562daa4230739937bbb0b4caf087)
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 7531a0e..e887c46 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -449,7 +449,7 @@ static void ensure_path(const char *dir) {
}
}
-static void setup_env() {
+static void setup_env(void) {
char *temp;
const char *pds = NULL;
const char *disp = getenv("DISPLAY");
commit 9c7869265fd5387a4d8ab7b4e8227982c4dc61d7
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Sat Sep 5 14:03:19 2009 -0700
XQuartz: pbproxy: 64bit fixes: Properly process an array of Atoms
(cherry picked from commit 1b659cda1af02762a31cc7875e457b08c8dc68b5)
diff --git a/hw/xquartz/pbproxy/x-selection.h b/hw/xquartz/pbproxy/x-selection.h
index d5bfcb5..fc903d0 100644
--- a/hw/xquartz/pbproxy/x-selection.h
+++ b/hw/xquartz/pbproxy/x-selection.h
@@ -41,6 +41,7 @@
struct propdata {
unsigned char *data;
size_t length;
+ int format;
};
struct atom_list {
diff --git a/hw/xquartz/pbproxy/x-selection.m b/hw/xquartz/pbproxy/x-selection.m
index cd540be..4f2d848 100644
--- a/hw/xquartz/pbproxy/x-selection.m
+++ b/hw/xquartz/pbproxy/x-selection.m
@@ -77,7 +77,7 @@ static struct {
@implementation x_selection
-static struct propdata null_propdata = {NULL, 0};
+static struct propdata null_propdata = {NULL, 0, 0};
#ifdef DEBUG
static void
@@ -212,6 +212,7 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Ato
pdata->data = buf;
pdata->length = buflen;
+ pdata->format = format;
return /*success*/ False;
}
@@ -223,21 +224,20 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Ato
- (Atom) find_preferred:(struct propdata *)pdata
{
Atom a = None;
- size_t i;
+ size_t i, step;
Bool png = False, jpeg = False, utf8 = False, string = False;
TRACE ();
- if (pdata->length % sizeof (a))
+ if (pdata->format != 32)
{
- fprintf(stderr, "Atom list is not a multiple of the size of an atom!\n");
+ fprintf(stderr, "Atom list is expected to be formatted as an array of 32bit values.\n");
return None;
}
- for (i = 0; i < pdata->length; i += sizeof (a))
+ for (i = 0, step = pdata->format >> 3; i < pdata->length; i += step)
{
- a = None;
- memcpy (&a, pdata->data + i, sizeof (a));
+ a = (Atom)*(uint32_t *)(pdata->data + i);
if (a == atoms->image_png)
{
More information about the xorg-commit
mailing list